Changed the timer so that it is working properly