Fix marking in different file formats