keypair checks, fixes #34