Fixed bug in RSA key generation