Are you sure the code is correct in your popups section?

You're sending the channel name as a command, instead of 'mode'.
.HalfOp: # +hhh $$1 $2 $3
That duplicates your behaviour. I cannot reproduce your initial error with the code you pasted.