Index: /code/branches/core7/src/libraries/network/Client.cc
===================================================================
--- /code/branches/core7/src/libraries/network/Client.cc	(revision 10565)
+++ /code/branches/core7/src/libraries/network/Client.cc	(revision 10566)
@@ -194,14 +194,4 @@
   void Client::connectionClosed()
   {
-    ObjectList<Synchronisable>::iterator it;
-    for(it = ObjectList<Synchronisable>::begin(); it; )
-    {
-      if( it->getSyncMode() != 0x0 )
-        (it++)->destroy();
-      else
-      {
-        ++it;
-      }
-    }
     Game::getInstance().popState();
     Game::getInstance().popState();
Index: /code/branches/core7/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- /code/branches/core7/src/orxonox/gamestates/GSLevel.cc	(revision 10565)
+++ /code/branches/core7/src/orxonox/gamestates/GSLevel.cc	(revision 10566)
@@ -95,4 +95,6 @@
         }
 
+        this->prepareObjectTracking();
+
         if (GameMode::isMaster())
         {
@@ -128,4 +130,8 @@
         if (GameMode::isMaster())
             this->unloadLevel();
+        else
+            this->unloadLevelAsClient();
+
+        this->performObjectTracking();
 
         if (GameMode::showsGraphics())
@@ -161,23 +167,12 @@
     }
 
-    void GSLevel::loadLevel()
+    void GSLevel::prepareObjectTracking()
     {
         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
             this->staticObjects_.insert(*it);
-
-        // call the loader
-        startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel());
-        bool loaded = Loader::getInstance().load(startFile_);
-
-        Core::getInstance().getConfig()->updateLastLevelTimestamp();
-        if(!loaded)
-            GSRoot::delayedStartMainMenu();
-    }
-
-    void GSLevel::unloadLevel()
-    {
-        Loader::getInstance().unload(startFile_);
-        delete startFile_;
-
+    }
+
+    void GSLevel::performObjectTracking()
+    {
         orxout(internal_info) << "Remaining objects:" << endl;
         unsigned int i = 0;
@@ -187,5 +182,5 @@
             if (find == this->staticObjects_.end())
             {
-                orxout(internal_info) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl;
+                orxout(internal_warning) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl;
             }
         }
@@ -194,4 +189,39 @@
         else
             orxout(internal_warning) << i << " objects remaining. Try harder!" << endl;
+    }
+
+    void GSLevel::loadLevel()
+    {
+        // call the loader
+        startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel());
+        bool loaded = Loader::getInstance().load(startFile_);
+
+        Core::getInstance().getConfig()->updateLastLevelTimestamp();
+        if(!loaded)
+            GSRoot::delayedStartMainMenu();
+    }
+
+    void GSLevel::unloadLevel()
+    {
+        Loader::getInstance().unload(startFile_);
+        delete startFile_;
+    }
+
+    /**
+     * Unloads a level when the game instance is (or was) a client in a multiplayer session.
+     * In this case, cleanup after unloading a level is done differently because certain things (e.g. the xml file) are unknown.
+     */
+    void GSLevel::unloadLevelAsClient()
+    {
+        ObjectList<Synchronisable>::iterator it;
+        for(it = ObjectList<Synchronisable>::begin(); it; )
+        {
+            if( it->getSyncMode() != 0x0 )
+                (it++)->destroy();
+            else
+            {
+                ++it;
+            }
+        }
     }
 
Index: /code/branches/core7/src/orxonox/gamestates/GSLevel.h
===================================================================
--- /code/branches/core7/src/orxonox/gamestates/GSLevel.h	(revision 10565)
+++ /code/branches/core7/src/orxonox/gamestates/GSLevel.h	(revision 10566)
@@ -53,7 +53,11 @@
         void reloadLevel();
 
-    protected:
+    private:
         void loadLevel();
         void unloadLevel();
+        void unloadLevelAsClient();
+
+        void prepareObjectTracking();
+        void performObjectTracking();
 
         InputState*              gameInputState_;          //!< input state for normal ingame playing
