     
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         DKPopoverViewController.dismissPopoverViewController()
-		
-		self.selectedGroup = self.groups![indexPath.row]
+
+        guard let groups = self.groups, groups.count > indexPath.row else {
+            assertionFailure("Expect groups with count > \(indexPath.row)")
+            return
+        }
+		
+		self.selectedGroup = groups[indexPath.row]
 		selectedGroupDidChangeBlock?(self.selectedGroup)
     }
 	
 	// MARK: - DKGroupDataManagerObserver methods
 	
 	func groupDidUpdate(_ groupId: String) {
-		let indexPath = IndexPath(row: self.groups!.index(of: groupId)!, section: 0)
-		self.tableView.reloadRows(at: [indexPath], with: .none)
-	}
-	
-	func groupDidRemove(_ groupId: String) {
-		let indexPath = IndexPath(row: self.groups!.index(of: groupId)!, section: 0)
-		self.groups?.remove(at: indexPath.row)
-		self.tableView.deleteRows(at: [indexPath], with: .none)
-		
-		if self.selectedGroup == groupId {
-			self.selectedGroup = self.groups?.first
-			selectedGroupDidChangeBlock?(self.selectedGroup)
-			self.tableView.selectRow(at: IndexPath(row: 0, section: 0), animated: false, scrollPosition: .none)
-		}
-	}
-    
+		self.tableView.reloadData()
+	}
+	
+    func groupDidRemove(_ groupId: String) {
+        guard let row = self.groups?.index(of: groupId) else { return }
+        self.groups?.remove(at: row)
+
+        self.tableView.reloadData()
+
+        if self.selectedGroup == groupId {
+            self.selectedGroup = self.groups?.first
+            selectedGroupDidChangeBlock?(self.selectedGroup)
+            self.tableView.selectRow(at: IndexPath(row: 0, section: 0), animated: false, scrollPosition: .none)
+        }
+    }
 }

	
	internal func loadGroups() {
		getImageManager().groupDataManager.fetchGroups { [weak self] groups, error in
			guard let strongSelf = self else { return }
			
			if error == nil {
				strongSelf.groups = groups!
				strongSelf.selectedGroup = strongSelf.defaultAssetGroupOfAppropriate()
				if let selectedGroup = strongSelf.selectedGroup {
					strongSelf.tableView.selectRow(at: IndexPath(row: groups!.index(of: selectedGroup)!, section: 0),
						animated: false,
						scrollPosition: .none)
				}
				
				strongSelf.selectedGroupDidChangeBlock?(strongSelf.selectedGroup)

					}
				}
			}
			return groups.first
		}
		return nil
	}
