fix crash in keyring format