Improved how to set the distination of the task.