fix "negative remaining time after waking from sleep"