diff --git a/contrib/fusiondirectory.conf b/contrib/fusiondirectory.conf
index 91dede14d42a79dd2c3aa85ad78f5c0c220ba624..9b669a8e9821b8e26afa9f409cddf75466995a27 100644
--- a/contrib/fusiondirectory.conf
+++ b/contrib/fusiondirectory.conf
@@ -33,7 +33,7 @@
         forceSSL="FALSE"
 {/if}
         templateCompileDirectory="{$templateCompileDirectory}"
-        debugLevel="{$cv.fdDebugLevel}"
+        debugLevel="{$cv.debugLevel}"
     >
 
     <!-- Location definition -->
diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index eda49fc380ffcba73d381ef459323061519d1c2b..5c69b2328cab638285e043bcd5a6e763cc28b646 100644
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
@@ -303,7 +303,7 @@ class setup
     $cv['fdLogging']        = FALSE;
     $cv['fdDisplayErrors']  = FALSE;
     $cv['fdForceSSL']       = TRUE;
-    $cv['fdDebugLevel']     = 0;
+    $cv['debugLevel']       = 0;
     $smarty->assign("cv",                       xmlentities($cv));
     $smarty->assign("config_checksum",          md5(file_get_contents(CONFIG_TEMPLATE_DIR.CONFIG_FILE)));
     $smarty->assign("templateCompileDirectory", SPOOL_DIR);
@@ -314,5 +314,10 @@ class setup
     load_plist();
     $this->o_steps[$this->i_config] = new Step_Config($this->captured_values);
   }
+
+  function getDebugLevel ()
+  {
+    return $this->o_steps[$this->i_config]->attributesAccess['fdDebugLevel']->computeLdapValue();
+  }
 }
 ?>
diff --git a/setup/class_setupStep_Finish.inc b/setup/class_setupStep_Finish.inc
index 7a4f2a8835b8d492ffb37956b4e70352fb2c3581..2e0dd94a748b2ffb140706ab5da8c5d00dede941 100644
--- a/setup/class_setupStep_Finish.inc
+++ b/setup/class_setupStep_Finish.inc
@@ -44,8 +44,10 @@ class Step_Finish extends setupStep
 
   function get_conf_data()
   {
-    $smarty = get_smarty();
-    $smarty->assign('cv',                       xmlentities($this->parent->captured_values));
+    $smarty           = get_smarty();
+    $cv               = $this->parent->captured_values;
+    $cv['debugLevel'] = $this->parent->getDebugLevel();
+    $smarty->assign('cv',                       xmlentities($cv));
     $smarty->assign('config_checksum',          md5(file_get_contents(CONFIG_TEMPLATE_DIR.CONFIG_FILE)));
     $smarty->assign('templateCompileDirectory', SPOOL_DIR);
     return $smarty->fetch(CONFIG_TEMPLATE_DIR.CONFIG_FILE);