fix a bug causing segment fault when the multiple uploading task is cancelled