fix passing pubkey