Any reason that
Code:
on *:CONNECTFAIL:{ 
  code blah blah
}

follows the invalid/red highlighting?