Added the forgotten sleep in main cycle