fix screen off logic