Fixed returning private key when serializing public key.