fix crash in dmg format