Fix the bug that TaskMonitor doesn't remove FINISHED task.