fix the sleep problem