fixed bug related to using existing keypair