diff --git a/decloud/core/system.py b/decloud/core/system.py
index b4810135a43bc0e960fb46704991e8a61fa77046..7101a6591e8f12a83c0250fb2718d50af2462ecb 100644
--- a/decloud/core/system.py
+++ b/decloud/core/system.py
@@ -44,7 +44,10 @@ def get_commit_hash():
     try:
         commit_hash = repo.active_branch.name + "_" + repo.head.object.hexsha[0:5]
     except TypeError:
-        commit_hash = 'DETACHED_' + repo.head.object.hexsha[0:5]
+        try:
+            commit_hash = 'DETACHED_' + repo.head.object.hexsha[0:5]
+        except TypeError:
+            commit_hash = 'NoHash'
 
     return commit_hash
 
@@ -55,7 +58,7 @@ def get_directories(root):
     :param root: root directory
     :return: list of directories
     """
-    return [pathify(root) + item for item in os.listdir(root)]
+    return [os.path.join(root, item) for item in os.listdir(root)]
 
 
 def get_files(directory, ext=None):