fix validation of OP_CHECKSIG