fix pem public key creation