Fix for sleep refactor.