fixed minor bug in interrupt handler