Added pubkey check