Fixes to keychain.