Fix overflow of the timer.