Fix some problems with the timer.