Bug fix for timer.