diff --git a/cfg_checker/modules/packages/checker.py b/cfg_checker/modules/packages/checker.py
index b2e8194..46e98be 100644
--- a/cfg_checker/modules/packages/checker.py
+++ b/cfg_checker/modules/packages/checker.py
@@ -453,7 +453,7 @@
         self.master = SaltNodes(config)
         super(SaltCloudPackageChecker, self).__init__(
             config,
-            force_tag=None,
+            force_tag=force_tag,
             exclude_keywords=[],
             skip_list=None,
             skip_list_file=None
@@ -472,7 +472,7 @@
         self.master = KubeNodes(config)
         super(KubeCloudPackageChecker, self).__init__(
             config,
-            force_tag=None,
+            force_tag=force_tag,
             exclude_keywords=[],
             skip_list=None,
             skip_list_file=None
diff --git a/cfg_checker/modules/packages/repos.py b/cfg_checker/modules/packages/repos.py
index 824275d..1a040ff 100644
--- a/cfg_checker/modules/packages/repos.py
+++ b/cfg_checker/modules/packages/repos.py
@@ -50,13 +50,9 @@
     _val = value
     if header:
         try:
-            _ = next(filter(lambda i: _di[i]["header"] == header, _di))
-            # iterator not empty, find index
-            for _k, _v in _di.items():
-                if _v["header"] == header:
-                    _index = _k
+            _index = next(i for i in _di if header in _di[i]['header'])
         except StopIteration:
-            _index = str(len(_di.keys()) + 1)
+            _index = str(len(_di) + 1)
             _di[_index] = {
                 "header": header,
                 "props": _val
@@ -65,13 +61,10 @@
             return _index
     else:
         try:
-            _ = next(filter(lambda i: _di[i] == _val, _di))
+            _index = next(i for i in _di if _val in _di[i])
             # iterator not empty, find index
-            for _k, _v in _di.items():
-                if _v == _val:
-                    _index = _k
         except StopIteration:
-            _index = str(len(_di.keys()) + 1)
+            _index = str(len(_di) + 1)
             # on save, cast it as str
             _di[_index] = _val
         finally:
@@ -260,7 +253,7 @@
             _total_index = len(_sub_tags)
             _index = 0
             _progress = Progress(_total_index)
-            logger.debug(
+            logger_cli.debug(
                 "... found {} subtags for '{}'".format(
                     len(_sub_tags),
                     _label
@@ -270,7 +263,7 @@
             for _stag in _sub_tags:
                 _u = _baseurl + _stag
                 _index += 1
-                logger.debug(
+                logger_cli.debug(
                     "... searching repos in '{}/{}'".format(
                         _label,
                         _stag
@@ -278,13 +271,13 @@
                 )
 
                 # Searching Package collections
-                if _stag in ubuntu_releases:
+                if _stag in ubuntu_releases or _stag.startswith("ubuntu-2020"):
                     # if stag is the release, this is all packages
                     _repo["all"][_stag] = []
                     _repo["all"]["url"] = _n_url(_u)
                     _path_list = self.search_pkg(_n_url(_u), [])
                     self._map_repo(_path_list, _repo["all"][_stag])
-                    logger.info(
+                    logger_cli.info(
                         "-> found {} dists".format(
                             len(_repo["all"][_stag])
                         )
@@ -299,7 +292,7 @@
                     _releases, _ = self._ls_repo_page(_n_url(_u))
                     for _rel in _releases:
                         if _rel not in ubuntu_releases:
-                            logger.debug(
+                            logger_cli.debug(
                                 "... skipped unknown ubuntu release: "
                                 "'{}' in '{}'".format(
                                     _rel,
@@ -314,7 +307,7 @@
                                 _path_list,
                                 _repo[_stag][_rel]
                             )
-                            logger.info(
+                            logger_cli.info(
                                 "-> found {} dists for '{}'".format(
                                     len(_repo[_stag][_rel]),
                                     _rel
@@ -579,7 +572,7 @@
         _other_repos = 0
         for _c, _d in _info.items():
             for _ur, _l in _d.items():
-                if _ur in ubuntu_releases:
+                if _ur in ubuntu_releases or _ur.startswith("ubuntu-2020"):
                     _ubuntu_package_repos += len(_l)
                 elif _ur != 'url':
                     _other_repos += len(_l)
@@ -741,10 +734,16 @@
                         elif _line.startswith(' '):
                             _desc[_key] += "\n{}".format(_line)
                         else:
-                            _key = _line[:_line.index(':')]
-                            _value = _line[_line.index(':')+1:]
-                            _key = _key.lower()
+                            if _line.endswith(":"):
+                                _key = _line[:-1]
+                                _value = ""
+                            else:
+                                _key, _value = _line.split(": ", 1)
+                            # _key = _line[:_line.index(':')]
 
+                            # _value = _line[_line.index(':')+1:]
+                            # _value = _value if _value[0] != ' ' else _value[1:]
+                            _key = _key.lower()
                             _desc[_key] = _value
                     # save descriptions if needed
                     if descriptions:
