Fix pubkey encoding