Fix drawing in different file formats