fixed the hardware bug where led should be red before sleeping