fixed a bug to manage task list.