Idle loop goes to sleep mode