     
     public func updateItem(item: T, atIndexPath indexPath: IndexPath) {
 
-        if var array = arrayItems[indexPath.section] {
+        if arrayItems.count > indexPath.section, var array = arrayItems[indexPath.section] {
 
             array[indexPath.row] = item
-        }
-        
-        delegate?.providerDidUpdateItemsAtIndexPaths(items: [item], atIndexPaths: [indexPath])
+            arrayItems[indexPath.section] = array
+
+            delegate?.providerDidUpdateItemsAtIndexPaths(items: [item], atIndexPaths: [indexPath])
+        }
     }
     
     public func deleteAllInSection(section: Int) {
 
-        arrayItems.removeAll()
-        
-        delegate?.providerDidDeleteAllItemsInSection(section: 0)
+        if arrayItems.count > section, var array = arrayItems[section] {
+
+            array.removeAll()
+            arrayItems[section] = array
+
+            delegate?.providerDidDeleteAllItemsInSection(section: 0)
+        }
     }
     
     public func batchUpdates(updatesBlock: VoidCompletion) {

        if arrayItems.count > indexPath.section, var array = arrayItems[indexPath.section] {

            array.insert(item, at: indexPath.row)
        } else {

            var array = [T]()

    
    public func itemAtIndexPath(indexPath: IndexPath) -> T {

        guard arrayItems.count > indexPath.section, let array = arrayItems[indexPath.section] else {
            preconditionFailure("There was no item at indexPath \(indexPath)")
        }

        return array[indexPath.row]
    }
    
    public func deleteItemAtIndexPath(indexPath: IndexPath) {

        var items = [T]()
        if arrayItems.count > indexPath.section, var array = arrayItems[indexPath.section] {

            let item = array[indexPath.row]
            items.append(item)
            array.remove(at: indexPath.row)
            arrayItems[indexPath.section] = array

            delegate?.providerDidDeleteItemsAtIndexPaths(items: items, atIndexPaths: [indexPath])
        }
    }

    public func insertItem(item: T, atIndexPath indexPath: IndexPath) {
