Sleep mode fixes.