     
     /// This will remove all views added
     private func resetToPossibleState(completion: ((Bool) -> Void)?){
-        UIView.animateWithDuration(dataSource?.hideAnimationDurationForDataRequestView(self) ?? 0, animations: { [unowned self] in ()
-            self.loadingView?.alpha = 0
-            self.emptyView?.alpha = 0
-            self.reloadView?.alpha = 0
+        UIView.animateWithDuration(dataSource?.hideAnimationDurationForDataRequestView(self) ?? 0, animations: { [weak self] in ()
+            self?.loadingView?.alpha = 0
+            self?.emptyView?.alpha = 0
+            self?.reloadView?.alpha = 0
         }) { [weak self] (completed) in
             if completed {
                 self?.resetViews([self?.loadingView, self?.emptyView, self?.reloadView])

        return false
    }
}

    }
}

/// NSError extension
private extension NSError {
    func isNetworkConnectionError() -> Bool {
        let networkErrors = [NSURLErrorNetworkConnectionLost, NSURLErrorNotConnectedToInternet]
        
