Fix a bug causing a warning to pop up when a request was cancelled.