                                   Webview interfaces
    *************************************************************************************/
   override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
-    if keyPath != nil {
+    if isActive && keyPath != nil {
       switch keyPath! {
       case "estimatedProgress":
         if webView != nil {

      }
      title = "Loading..."
      webView!.isHidden = false
      self.hasOrange = false
      webView!.load(URLRequest(url: URL(string:url)!))
      sendMessage(id:id, message:"OK")
    } else {

  func closeBrowser(id:String) {
    closeWebView()
    hasOrange = false
    isActive = false
    title = "iWptBrowser"
    sendMessage(id:id, message:"OK")
  }
