Only speculating but...

Try removing the 'harm' condition from your macro. I'm guessing that when your main becomes polymorphed (hexed), the 'harm' flag is turned off

Cheers,
Stealthy