Index: code/branches/gui/src/core/Game.cc
===================================================================
--- code/branches/gui/src/core/Game.cc	(revision 2849)
+++ code/branches/gui/src/core/Game.cc	(revision 2850)
@@ -40,4 +40,5 @@
 #include "util/Debug.h"
 #include "util/Exception.h"
+#include "util/SubString.h"
 #include "Clock.h"
 #include "CommandLine.h"
@@ -247,5 +248,5 @@
         // Check parent and all its grand parents
         GameStateTreeNode* currentNode = lastRequestedNode;
-        while (requestedNode == NULL && currentNode->parent_ != NULL)
+        while (requestedNode == NULL && currentNode != NULL)
         {
             if (currentNode->state_ == state)
@@ -260,4 +261,11 @@
     }
 
+    void Game::requestStates(const std::string& names)
+    {
+        SubString tokens(names, ",;", " ");
+        for (unsigned int i = 0; i < tokens.size(); ++i)
+            this->requestState(tokens[i]);
+    }
+
     void Game::popState()
     {
@@ -270,5 +278,5 @@
     GameState* Game::getState(const std::string& name)
     {
-        std::map<std::string, GameState*>::const_iterator it = allStates_s.find(name);
+        std::map<std::string, GameState*>::const_iterator it = allStates_s.find(getLowercase(name));
         if (it != allStates_s.end())
             return it->second;
@@ -356,5 +364,8 @@
     void Game::loadState(GameState* state)
     {
+        if (!this->activeStates_.empty())
+            this->activeStates_.back()->activity_.topState = false;
         state->activate();
+        state->activity_.topState = true;
         this->activeStates_.push_back(state);
     }
@@ -362,13 +373,16 @@
     void Game::unloadState(orxonox::GameState* state)
     {
+        state->activity_.topState = false;
         state->deactivate();
         this->activeStates_.pop_back();
+        if (!this->activeStates_.empty())
+            this->activeStates_.back()->activity_.topState = true;
     }
 
     /*static*/ bool Game::addGameState(GameState* state)
     {
-        std::map<std::string, GameState*>::const_iterator it = allStates_s.find(state->getName());
+        std::map<std::string, GameState*>::const_iterator it = allStates_s.find(getLowercase(state->getName()));
         if (it == allStates_s.end())
-            allStates_s[state->getName()] = state;
+            allStates_s[getLowercase(state->getName())] = state;
         else
             ThrowException(GameState, "Cannot add two GameStates with the same name to 'Game'.");
Index: code/branches/gui/src/core/Game.h
===================================================================
--- code/branches/gui/src/core/Game.h	(revision 2849)
+++ code/branches/gui/src/core/Game.h	(revision 2850)
@@ -66,4 +66,5 @@
 
         void requestState(const std::string& name);
+        void requestStates(const std::string& names);
         void popState();
 
Index: code/branches/gui/src/core/GameState.cc
===================================================================
--- code/branches/gui/src/core/GameState.cc	(revision 2849)
+++ code/branches/gui/src/core/GameState.cc	(revision 2850)
@@ -49,6 +49,10 @@
         , parent_(0)
     {
-        State temp = {false, false, false, false, false};
-        this->activity_ = temp;
+        this->activity_.activating   = false;
+        this->activity_.active       = false;
+        this->activity_.deactivating = false;
+        this->activity_.suspended    = false;
+        this->activity_.topState     = false;
+        this->activity_.updating     = false;
     }
 
Index: code/branches/gui/src/core/GameState.h
===================================================================
--- code/branches/gui/src/core/GameState.h	(revision 2849)
+++ code/branches/gui/src/core/GameState.h	(revision 2850)
@@ -74,4 +74,5 @@
             unsigned updating     : 1;
             unsigned suspended    : 1;
+            unsigned topState     : 1;
         };
 
@@ -81,5 +82,5 @@
 
         const std::string& getName() const { return name_; }
-        const State getActivity() const    { return this->activity_; }
+        State getActivity() const    { return this->activity_; }
         GameState* getParent() const       { return this->parent_; }
 
