Fixed bug when clearing timer