handle cancellation of AsyncTasks