fixed sleep issue