fixed memory leak of timer