         webView.registerForDraggedTypes(Array(webView.acceptableTypes))
 
         //  Watch javascript selection messages unless already done
-        let controller = webView.configuration.userContentController
+        let controller = config.userContentController
         if controller.userScripts.count > 0 { return }
         
         controller.add(self, name: "newWindowWithUrlDetected")

    }
    
    fileprivate func setupWebView() {
        
        webView.autoresizingMask = [NSView.AutoresizingMask.height, NSView.AutoresizingMask.width]
        if webView.constraints.count == 0 {

        //  Fetch, synchronize and observe data store for cookie changes
        if #available(OSX 10.13, *) {
            let websiteDataStore = WKWebsiteDataStore.nonPersistent()
            config.websiteDataStore = websiteDataStore
            
            config.processPool = WKProcessPool()
            let cookies = HTTPCookieStorage.shared.cookies ?? [HTTPCookie]()
            
            cookies.forEach({ config.websiteDataStore.httpCookieStore.setCookie($0, completionHandler: nil) })
            WKWebsiteDataStore.default().httpCookieStore.add(self)
        }
        
