Fix error when saving a task.