Fixed bug in timer.