Bugfix for delay sleep