Another fix for keypair