Fixed bugs involving sleeping/focus changes with test console