diff --git a/setup/cli/modules/class.module.php b/setup/cli/modules/class.module.php
index 501e6534e78a71be08b62422d2f383f9d215b585..70c2eebebd730d4aa18f901607c6f00c96f28fed 100644
--- a/setup/cli/modules/class.module.php
+++ b/setup/cli/modules/class.module.php
@@ -142,6 +142,8 @@ class Module {
         $this->parseOptions();
         if (isset($this->_options[$name]))
             return $this->_options[$name];
+        elseif ($this->options[$name]->default)
+            return $this->options[$name]->default;
         else
             return $default;
     }
@@ -167,6 +169,10 @@ class Module {
             else
                 $this->_args[$name] = &$this->_args[$idx];
 
+        foreach ($this->options as $name=>$opt)
+            if (!isset($this->_options[$name]))
+                $this->_options[$name] = $opt->default;
+
         if ($this->autohelp && $this->getOption('help')) {
             $this->showHelp();
             die();