diff --git a/tcp_tests/managers/saltmanager.py b/tcp_tests/managers/saltmanager.py
index b65c74f..4a83e12 100644
--- a/tcp_tests/managers/saltmanager.py
+++ b/tcp_tests/managers/saltmanager.py
@@ -27,8 +27,8 @@
 class SaltManager(ExecuteCommandsMixin):
     """docstring for SaltManager"""
 
-    _config = None
-    _underlay = None
+    __config = None
+    __underlay = None
     _map = {
         'enforceState': 'enforce_state',
         'enforceStates': 'enforce_states',
@@ -37,8 +37,8 @@
     }
 
     def __init__(self, config, underlay, host=None, port='6969'):
-        self._config = config
-        self._underlay = underlay
+        self.__config = config
+        self.__underlay = underlay
         self._port = port
         self._host = host
         self._api = None
@@ -46,7 +46,7 @@
         self._password = settings.SALT_PASSWORD
         self._salt = self
 
-        super(SaltManager, self).__init__()
+        super(SaltManager, self).__init__(config=config, underlay=underlay)
 
     def install(self, commands):
         if commands[0].get('do'):
@@ -55,23 +55,23 @@
             self.install1(commands)
 
     def install1(self, commands):
-        if self._config.salt.salt_master_host == '0.0.0.0':
+        if self.__config.salt.salt_master_host == '0.0.0.0':
             # Temporary workaround. Underlay should be extended with roles
-            salt_nodes = self._underlay.node_names()
-            self._config.salt.salt_master_host = \
-                self._underlay.host_by_node_name(salt_nodes[0])
+            salt_nodes = self.__underlay.node_names()
+            self.__config.salt.salt_master_host = \
+                self.__underlay.host_by_node_name(salt_nodes[0])
 
-        # self._underlay.execute_commands(commands=commands,
+        # self.__underlay.execute_commands(commands=commands,
         #                                  label="Install and configure salt")
         self.execute_commands(commands=commands,
                               label="Install and configure salt")
 
     def install2(self, commands):
-        if self._config.salt.salt_master_host == '0.0.0.0':
+        if self.__config.salt.salt_master_host == '0.0.0.0':
             # Temporary workaround. Underlay should be extended with roles
-            salt_nodes = self._underlay.node_names()
-            self._config.salt.salt_master_host = \
-                self._underlay.host_by_node_name(salt_nodes[0])
+            salt_nodes = self.__underlay.node_names()
+            self.__config.salt.salt_master_host = \
+                self.__underlay.host_by_node_name(salt_nodes[0])
 
         # self.run_commands(commands=commands,
         #                   label="Install and configure salt")
@@ -86,13 +86,13 @@
     def host(self):
         if self._host:
             return self._host
-        elif self._config.salt.salt_master_host == '0.0.0.0':
+        elif self.__config.salt.salt_master_host == '0.0.0.0':
             # Temporary workaround. Underlay should be extended with roles
-            salt_nodes = self._underlay.node_names()
-            self._config.salt.salt_master_host = \
-                self._underlay.host_by_node_name(salt_nodes[0])
+            salt_nodes = self.__underlay.node_names()
+            self.__config.salt.salt_master_host = \
+                self.__underlay.host_by_node_name(salt_nodes[0])
 
-        return self._config.salt.salt_master_host
+        return self.__config.salt.salt_master_host
 
     @property
     def api(self):
@@ -134,6 +134,8 @@
             raise LookupError("Result is empty or absent")
 
         result = r['return'][0]
+        if len(result) == 0:
+            raise LookupError("Result is empty or absent")
         LOG.info("Job has result for %s nodes", result.keys())
         fails = defaultdict(list)
         for h in result:
