Fix the bug in Timer scheduler.