Prevent sleep-message when sleeping

Issue #2550