KeyPair Generation Fix