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

    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        DKPopoverViewController.dismissPopoverViewController()
		
		self.selectedGroup = self.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)
		}
	}
    
}

    }
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        guard let groups = groups,
            let cell = tableView.dequeueReusableCell(withIdentifier: DKImageGroupCellIdentifier, for: indexPath) as? DKAssetGroupCell else
        {
            assertionFailure("Expect groups and cell")
            return UITableViewCell()
        }
		
        let assetGroup = getImageManager().groupDataManager.fetchGroupWithGroupId(groups[indexPath.row])
        cell.groupNameLabel.text = assetGroup.groupName
		
		let tag = indexPath.row + 1
