 
     internal func loadGroups() {
         getImageManager().groupDataManager.fetchGroups { [weak self] groups, error in
-            guard let groups = groups, let strongSelf = self else { return }
-
-            if error == nil {
-                strongSelf.groups = groups
-                strongSelf.selectedGroup = strongSelf.defaultAssetGroupOfAppropriate()
-                if let selectedGroup = strongSelf.selectedGroup,
-                    let row =  groups.index(of: selectedGroup)
-                {
-                    strongSelf.tableView.selectRow(
-                        at: IndexPath(row: row, section: 0),
-                        animated: false,
-                        scrollPosition: .none)
+            guard let groups = groups, let strongSelf = self, error == nil else { return }
+
+            strongSelf.groups = groups
+            strongSelf.selectedGroup = strongSelf.defaultAssetGroupOfAppropriate()
+            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)
+        }
+    }
+
+    fileprivate func defaultAssetGroupOfAppropriate() -> String? {
+        guard let groups = self.groups else { return nil }
+        if let defaultAssetGroup = self.defaultAssetGroup {
+            for groupId in groups {
+                let group = getImageManager().groupDataManager.fetchGroupWithGroupId(groupId)
+                if defaultAssetGroup == group.originalCollection.assetCollectionSubtype {
+                    return groupId
                 }
-
-                strongSelf.selectedGroupDidChangeBlock?(strongSelf.selectedGroup)
-            }
-        }
-    }
-
-    fileprivate func defaultAssetGroupOfAppropriate() -> String? {
-        if let groups = self.groups {
-            if let defaultAssetGroup = self.defaultAssetGroup {
-                for groupId in groups {
-                    let group = getImageManager().groupDataManager.fetchGroupWithGroupId(groupId)
-                    if defaultAssetGroup == group.originalCollection.assetCollectionSubtype {
-                        return groupId
-                    }
-                }
-            }
-            return groups.first
-        }
-        return nil
+            }
+        }
+        return groups.first
     }
 
     // MARK: - UITableViewDelegate, UITableViewDataSource methods


    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()

        if assetGroup.totalCount == 0 {
            cell.thumbnailImageView.image = DKImageResource.emptyAlbumIcon()
        } else {
            getImageManager().groupDataManager.fetchGroupThumbnailForGroup(
                assetGroup.groupId,
                size: CGSize(width: tableView.rowHeight, height: tableView.rowHeight).toPixel(),
                options: self.groupThumbnailRequestOptions) { image, info in
                    if cell.tag == tag {
                        cell.thumbnailImageView.image = image
                    }
            }
        }
        cell.totalCountLabel.text = String(assetGroup.totalCount)
