Fixed the timer bug