Better fix for sleep