Fixed memory leak caused by timers.