That macro tells the imp to start attacking every time you press the button, so if its in the middle of a cast it will re-start the cast. Try
Code:
/castsequence reset=target Fire Bolt, null
in place of /petattack.