Fixed pubkey parsing