             }
             
             return true
-        } else if url.scheme == "mailto" {
+        } else if scheme == "mailto" {
             print("Email")
             return true
-        } else if url.absoluteString != "about:blank" && url.scheme!.contains("http") && navigationType == .linkClicked {
+        } else if url.absoluteString != "about:blank" && scheme.contains("http") && navigationType == .linkClicked {
             
             if #available(iOS 9.0, *) {
                 let safariVC = SFSafariViewController(url: request.url!)

			var isClassBasedOnClickListenerScheme = false
			for listener in readerConfig.classBasedOnClickListeners {

				if let _urlScheme = url.scheme,
					(_urlScheme == listener.schemeName),
                    let absoluteURLString = request.url?.absoluteString,
                    let range = absoluteURLString.range(of: "/clientX=") {
                    let baseURL = absoluteURLString.substring(to: range.lowerBound)
                    let positionString = absoluteURLString.substring(from: range.lowerBound)
                    if let point = getEventTouchPoint(fromPositionParameterString: positionString) {
                        let attributeContentString = (baseURL.replacingOccurrences(of: "\(_urlScheme)://", with: "").removingPercentEncoding)
                        // Call the on click action block
                        listener.onClickAction(attributeContentString, point)
                        // Mark the scheme as class based click listener scheme

    }
    
    open func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool {
		guard
			let webView = webView as? FolioReaderWebView,
			let scheme = request.url?.scheme else {
				return true
		}

        guard let url = request.url else { return false }
        
        if scheme == "highlight" {
            
            shouldShowBar = false
            
