     @objc @discardableResult func fetchData(success: @escaping (_ response: Data) -> Void, failure: @escaping ResponseErrorBlock) -> URLSessionDataTask {
         
         return self.proceedFetching(success: { (data, response) in
-            success(data!)
+            DispatchQueue.main.async {
+                success(data!)
+            }
+            
         }, failure: { (error) in
-            failure(error)
+            DispatchQueue.main.async {
+                failure(error)
+            }
+            
         })
     }
     

    @objc @discardableResult func fetchJSON(readingOptions: JSONSerialization.ReadingOptions = [], success: @escaping (_ response: Any?) -> Void, failure: @escaping ResponseErrorBlock) -> URLSessionDataTask {        
        return self.fetchData(success: { (data) in
            do {
                success(try JSONSerialization.jsonObject(with: data, options: readingOptions))
            } catch {
                failure(ResponseErrorType.decoding)
            }
        }, failure: { (error) in
            failure(error)
        })
    }
}

        
        return self.fetchData(success: { (data) in
            do {
                let jsonObj = try decoder.decode(decodeable, from: data)
                DispatchQueue.main.async {
                    success(jsonObj)
                }
            } catch {
                DispatchQueue.main.async {
                    failure(ResponseErrorType.decoding)
                }                
            }
            
        }, failure: { (error) in
            DispatchQueue.main.async {
                failure(error)
            }
            
        })
        
    }
