script: fix pubkey template recognition