Fix error when finishing edit of new task.