Added crude anti-bounce check for the button in do_sleep().