Added ability to reset necessary branch when changing to new task.