Fixed a bug in which sleep timers were not cancelled properly