fixed sleep problem