Errors in encoder interrupts fixed