Index: /code/branches/console/src/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/console/src/core/ConfigValueContainer.cc	(revision 1323)
+++ /code/branches/console/src/core/ConfigValueContainer.cc	(revision 1324)
@@ -107,5 +107,5 @@
         if (this->bIsVector_)
         {
-            return this->callFunctionWithIndex(&ConfigValueContainer::set, input.getString());
+            return this->callFunctionWithIndex(&ConfigValueContainer::set, input.toString());
         }
         else
@@ -113,5 +113,5 @@
             if (this->tset(input))
             {
-                ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, input.getString(), this->value_.isA(MT_string));
+                ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, input.toString(), this->value_.isA(MT_string));
                 return true;
             }
@@ -132,5 +132,5 @@
             if (this->tset(index, input))
             {
-                ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, index, input.getString(), this->value_.isA(MT_string));
+                ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, index, input.toString(), this->value_.isA(MT_string));
                 return true;
             }
@@ -152,5 +152,5 @@
         if (this->bIsVector_)
         {
-            return this->callFunctionWithIndex(&ConfigValueContainer::tset, input.getString());
+            return this->callFunctionWithIndex(&ConfigValueContainer::tset, input.toString());
         }
         else
@@ -160,5 +160,4 @@
             {
                 this->value_ = temp;
-
                 if (this->identifier_)
                     this->identifier_->updateConfigValues();
@@ -191,9 +190,8 @@
                 {
                     this->valueVector_.push_back(MultiTypeMath());
-                    ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isA(MT_string));
                 }
             }
 
-            MultiTypeMath temp = this->valueVector_[index];
+            MultiTypeMath temp = this->value_;
             if (temp.assimilate(input))
             {
Index: /code/branches/console/src/core/ConfigValueContainer.h
===================================================================
--- /code/branches/console/src/core/ConfigValueContainer.h	(revision 1323)
+++ /code/branches/console/src/core/ConfigValueContainer.h	(revision 1324)
@@ -90,4 +90,10 @@
             }
 
+            template <typename T>
+            inline void setVectorType(const std::vector<T>& value)
+            {
+                this->value_ = T();
+            }
+
             inline const std::string& getName() const
                 { return this->varname_; }
Index: /code/branches/console/src/core/ConfigValueIncludes.h
===================================================================
--- /code/branches/console/src/core/ConfigValueIncludes.h	(revision 1323)
+++ /code/branches/console/src/core/ConfigValueIncludes.h	(revision 1324)
@@ -69,4 +69,5 @@
             temp.push_back(MultiTypeMath(defvalue[i])); \
         container##varname = new orxonox::ConfigValueContainer(CFT_Settings, this->getIdentifier(), #varname, temp); \
+        container##varname->setVectorType(varname); \
         this->getIdentifier()->addConfigValueContainer(#varname, container##varname); \
     } \
Index: /code/branches/console/src/core/Shell.cc
===================================================================
--- /code/branches/console/src/core/Shell.cc	(revision 1323)
+++ /code/branches/console/src/core/Shell.cc	(revision 1324)
@@ -80,7 +80,5 @@
         SetConfigValue(maxHistoryLength_, 100);
         SetConfigValue(historyOffset_, 0);
-        SetConfigValueVector(commandHistory_, std::vector<std::string>());
-
-std::cout << "gaga1: " << this->commandHistory_[this->historyOffset_] << std::endl;
+        SetConfigValueVector(commandHistory_, std::vector<std::string>(1, ""));
 
         if (this->historyOffset_ >= this->maxHistoryLength_)
@@ -93,6 +91,4 @@
             ModifyConfigValue(commandHistory_, remove, index);
         }
-
-std::cout << "gaga2: " << this->commandHistory_[this->historyOffset_] << std::endl;
     }
 
@@ -163,17 +159,16 @@
     void Shell::addToHistory(const std::string& command)
     {
-std::cout << "command: " << command << std::endl;
-std::cout << "offset: " << this->historyOffset_ << std::endl;
         ModifyConfigValue(commandHistory_, set, this->historyOffset_, command);
-//        this->commandHistory_[this->historyOffset_] = command;
         this->historyPosition_ = 0;
-std::cout << "gaga3: " << this->commandHistory_[this->historyOffset_] << std::endl;
         ModifyConfigValue(historyOffset_, set, (this->historyOffset_ + 1) % this->maxHistoryLength_);
-std::cout << "offset new: " << this->historyOffset_ << std::endl;
     }
 
     std::string Shell::getFromHistory() const
     {
-        return this->commandHistory_[(this->historyOffset_ - this->historyPosition_) % this->maxHistoryLength_];
+        unsigned int index = mod(((int)this->historyOffset_) - ((int)this->historyPosition_), this->maxHistoryLength_);
+        if (index < this->commandHistory_.size() && this->historyPosition_ != 0)
+            return this->commandHistory_[index];
+        else
+            return "";
     }
 
@@ -219,5 +214,5 @@
     void Shell::execute()
     {
-//        this->addToHistory(this->inputBuffer_.get());
+        this->addToHistory(this->inputBuffer_.get());
         this->addLine(this->inputBuffer_.get(), 0);
 
@@ -252,4 +247,5 @@
     {
         this->inputBuffer_.clear();
+        this->historyPosition_ = 0;
         SHELL_UPDATE_LISTENERS(inputChanged);
         SHELL_UPDATE_LISTENERS(cursorChanged);
@@ -282,5 +278,5 @@
     void Shell::history_up()
     {
-        if (this->historyPosition_ < (this->commandHistory_.size() - 1))
+        if (this->historyPosition_ < this->commandHistory_.size())
         {
             this->historyPosition_++;
Index: /code/branches/console/src/util/Math.h
===================================================================
--- /code/branches/console/src/util/Math.h	(revision 1323)
+++ /code/branches/console/src/util/Math.h	(revision 1324)
@@ -121,4 +121,13 @@
 
 template <typename T>
+inline int mod(T x, int max)
+{
+    if (x >= 0)
+        return (x % max);
+    else
+        return ((x % max) + max);
+}
+
+template <typename T>
 T interpolate(float time, const T& start, const T& end)
 {
