                 if(enabled == "true") {
                     self.navigationController!.setNavigationBarHidden(false, animated: false)
                     self.uiWebView.removeConstraint(self.uiWebViewStatusBarConstraint)
-                    self.uiWebView.addConstraint(self.uiWebViewNavigationBarConstraint)
+//                    self.uiWebView.addConstraint(self.uiWebViewNavigationBarConstraint)
                     
                     
                 } else {
-                    self.navigationController!.setNavigationBarHidden(true, animated: false)
-                    self.uiWebView.removeConstraint(self.uiWebViewNavigationBarConstraint)
-                    self.uiWebView.addConstraint(self.uiWebViewStatusBarConstraint)
+                    if let navigationController = self.navigationController {
+                        navigationController.setNavigationBarHidden(true, animated: false)
+                        self.uiWebView.removeConstraint(self.uiWebViewNavigationBarConstraint)
+                        self.uiWebView.addConstraint(self.uiWebViewStatusBarConstraint)
+                    }
                 }
             }
             

            }
            
            if let newScreen = params["newScreen"] as? String {
                if newScreen.hasSuffix(".html") {
                    let nextScreen = RHYWebViewController()
                    let showStatusBar = params["showNavigationBar"] as? String
                    nextScreen.HTMLFile = newScreen
                    nextScreen.menuContainerViewController = self.menuContainerViewController
                    
                    if(showStatusBar == "true") {
                        nextScreen.showNavigationBar = true;
//                        self.navigationController?.setNavigationBarHidden(false, animated: true)
//                        nextScreen.view.addConstraint(self.uiWebViewNavigationBarConstraint)
                    } else {
                        nextScreen.showNavigationBar = false;
//                        self.navigationController?.setNavigationBarHidden(true, animated: true)
//                        nextScreen.view.addConstraint(self.uiWebViewStatusBarConstraint)
                    }
                    
                    self.navigationController?.pushViewController(nextScreen, animated: true)
                } else {

        let fileURL = NSURL(string: relativePath, relativeToURL: baseURL);
        let URLRequest = NSURLRequest(URL: fileURL!);
        webView.loadRequest(URLRequest)

    }
    
    
