         }
     }
     
-    private func handle(result: WebControllerResult, fails: inout Int) throws -> String? {
+    private func handle(result: WebControllerResult, fails: Int) throws -> String? {
         switch result {
         case .response(let url):
             return try handle(url: url)
         case .error(let error):
-            try handle(error: error, fails: &fails)
+            try handle(error: error, fails: fails)
             return nil
         }
     }

                urlRequest: urlRequest,
                onResult: { [weak self] controllerResult in
                    do {
                        if let handledResult = try self?.handle(result: controllerResult, fails: &fails) {
                            result = .response(handledResult)
                        }
                    } catch let error {

                    
                    if result != nil {
                        self?.currentController?.dismiss()
                    } else {
                        fails += 1
                        self?.currentController?.reload()
                    }
                },
                onDismiss: {
