fixed issue with interrupt handler fro sleeping