fix a bug in TimerManager