         completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential!) -> Void) {
             
             let serverTrust = challenge.protectionSpace.serverTrust
-            var allow = false
+            var allow: Bool?
             
             if let config = Ladybug.sslPinning[task.originalRequest.URL!.host!] {
                 let certificate = SecTrustGetCertificateAtIndex(serverTrust, 0).takeRetainedValue()

    public static var additionalHeaders: [String: String] = [:]
    public static var beforeSend: (Request -> ())?
    public static var done: (Response -> ())?
    
    static var sslPinning: [String: SSLPinningConfig] = [:]
    

                }
            }
            
            if Ladybug.allowInvalidCertificates {
                completionHandler(.UseCredential, NSURLCredential(trust: serverTrust))
            } else if let proceed = allow {
                if proceed {
                    completionHandler(.UseCredential, NSURLCredential(trust: serverTrust))
                } else {
                    println("Invalid SSL certificate for host: \(task.originalRequest.URL!.host!)")
                    #if os(iOS)
                        UIApplication.sharedApplication().networkActivityIndicatorVisible = false
                    #endif
                }
            } else {
                completionHandler(.PerformDefaultHandling, nil)
            }
    }
    
