publicKey bug fix