Minor improvements to the sleep/wakeup-related code