                     case .success(let result):
                         if let _ = packedResponse.response {
                             observer.on(.next(result))
+                            observer.on(.completed)
                         }
                         else {
                             observer.on(.error(RxAlamofireUnknownError))
                         }
-                        observer.on(.completed)
                     case .failure(let error):
                         observer.on(.error(error as Error))
                     }

            self.base.downloadProgress { progress in
                let rxProgress = RxProgress(bytesWritten: progress.completedUnitCount,
                                            totalBytes: progress.totalUnitCount)
                observer.onNext(rxProgress)
                if rxProgress.bytesWritten >= rxProgress.totalBytes {
                    observer.onCompleted()
                }
            }
            return Disposables.create()

                case .success(let result):
                    if let httpResponse = packedResponse.response {
                        observer.on(.next(httpResponse, result))
                        observer.on(.completed)
                    }
                    else {
                        observer.on(.error(RxAlamofireUnknownError))
                    }
                case .failure(let error):
                    observer.on(.error(error as Error))
                }
