i saw 2 things
  1. You can't use Gosub in a interrupt handler
  2. I don't see that you re-enable the interrupts

And it should be only a part of your program 'cause i don't see any ON Interrupt goto statement.