bug fix: the timer is stuck when windows is maximized.