Fixed race condition with interruption of IDLE (fixed #155)