Fix keyring valid()