Added conditions to handle canceled tasks in AutoTransport

#2178