fix crash in gpg format