Fix scaling and sleep mode