Bugfix on sleeping logic