Fixed a bug saving private key on a shared credential.