Fixed race conditions in IDLE (#101)