diff --git a/storageengine/default.storage.inc b/storageengine/default.storage.inc
index f73e624..d039fda 100644
--- a/storageengine/default.storage.inc
+++ b/storageengine/default.storage.inc
@@ -148,8 +148,8 @@ class DefaultStorage implements Istorage {
       db_truncate('fast_gallery_hierarchy')->execute();
       $first_run = FALSE;
       variable_set('fast_gallery_runid', ++$runid);
-      $folders[$arImages[0]->getFolder()] = $this->storeHierarchy($arImages[0]);
     }
+    $folders[$arImages[0]->getFolder()] = $this->storeHierarchy($arImages[0]);
 
     foreach ($arImages as $image) {
       if ($image->isDir()) {
@@ -220,4 +220,4 @@ class DefaultStorage implements Istorage {
 
 
 
-}
\ No newline at end of file
+}
