     }
 
     func webView(webView: UIWebView, didFailLoadWithError error: Error) {
-        theBool = true
+        isFinished = true
         webViewLoadsCount = 0
         UIApplication.shared.isNetworkActivityIndicatorVisible = false
     }

    func webViewDidStartLoad(webView: UIWebView) {
        webViewLoadsCount += 1

        if webViewLoadsCount <= 1 {
            startAnimatingProgressBar()
        }

        UIApplication.shared.isNetworkActivityIndicatorVisible = true
    }


    }

    func startAnimatingProgressBar() {
        self.isFinished = false
        self.isHidden = false
        self.alpha = 0
        UIView.animate(withDuration: 0.2, animations: { () -> Void in
