fix sleep mode