Small tweak to idle_loop()