fix redundant deserialization of public key