Fix bug with task.