Index: /code/branches/core7/src/libraries/core/singleton/Scope.cc
===================================================================
--- /code/branches/core7/src/libraries/core/singleton/Scope.cc	(revision 10411)
+++ /code/branches/core7/src/libraries/core/singleton/Scope.cc	(revision 10412)
@@ -36,5 +36,13 @@
 namespace orxonox
 {
-    std::map<ScopeID::Value, int> ScopeManager::instanceCounts_s;
-    std::map<ScopeID::Value, std::set<ScopeListener*> > ScopeManager::listeners_s;
+    /*static*/ std::map<ScopeID::Value, int>& ScopeManager::getInstanceCounts()
+    {
+        static std::map<ScopeID::Value, int> instanceCounts;
+        return instanceCounts;
+    }
+    /*static*/ std::map<ScopeID::Value, std::set<ScopeListener*> >& ScopeManager::getListeners()
+    {
+        static std::map<ScopeID::Value, std::set<ScopeListener*> > listeners;
+        return listeners;
+    }
 }
Index: /code/branches/core7/src/libraries/core/singleton/Scope.h
===================================================================
--- /code/branches/core7/src/libraries/core/singleton/Scope.h	(revision 10411)
+++ /code/branches/core7/src/libraries/core/singleton/Scope.h	(revision 10412)
@@ -80,6 +80,6 @@
 
         private:
-            static std::map<ScopeID::Value, int> instanceCounts_s;                  //!< Counts the number of active instances (>0 means active) for a scope
-            static std::map<ScopeID::Value, std::set<ScopeListener*> > listeners_s; //!< Stores all listeners for a scope
+            static std::map<ScopeID::Value, int>& getInstanceCounts();                  //!< Counts the number of active instances (>0 means active) for a scope
+            static std::map<ScopeID::Value, std::set<ScopeListener*> >& getListeners(); //!< Stores all listeners for a scope
     };
 
@@ -98,8 +98,8 @@
             //! Constructor: Registers the instance.
             ScopeListener(ScopeID::Value scope) : scope_(scope), bActivated_(false)
-                { ScopeManager::listeners_s[this->scope_].insert(this); }
+                { ScopeManager::getListeners()[this->scope_].insert(this); }
             //! Destructor: Unregisters the instance.
             virtual ~ScopeListener()
-                { ScopeManager::listeners_s[this->scope_].erase(this); }
+                { ScopeManager::getListeners()[this->scope_].erase(this); }
 
             //! Gets called if the scope is activated
@@ -132,10 +132,10 @@
                 try
                 {
-                    ScopeManager::instanceCounts_s[scope]++;
-                    assert(ScopeManager::instanceCounts_s[scope] > 0);
-                    if (ScopeManager::instanceCounts_s[scope] == 1)
+                    ScopeManager::getInstanceCounts()[scope]++;
+                    assert(ScopeManager::getInstanceCounts()[scope] > 0);
+                    if (ScopeManager::getInstanceCounts()[scope] == 1)
                     {
                         Loki::ScopeGuard deactivator = Loki::MakeObjGuard(*this, &Scope::deactivateListeners);
-                        for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
+                        for (typename std::set<ScopeListener*>::iterator it = ScopeManager::getListeners()[scope].begin(); it != ScopeManager::getListeners()[scope].end(); )
                         {
                             (*it)->activated();
@@ -147,5 +147,5 @@
                 catch (...)
                 {
-                    ScopeManager::instanceCounts_s[scope]--;
+                    ScopeManager::getInstanceCounts()[scope]--;
                     throw;
                 }
@@ -159,12 +159,12 @@
                 orxout(internal_status) << "destroying scope... (" << scope << ")" << endl;
 
-                ScopeManager::instanceCounts_s[scope]--;
+                ScopeManager::getInstanceCounts()[scope]--;
 
                 // This shouldn't happen but just to be sure: check if the count is positive
-                assert(ScopeManager::instanceCounts_s[scope] >= 0);
-                if (ScopeManager::instanceCounts_s[scope] < 0)
-                    ScopeManager::instanceCounts_s[scope] = 0;
-
-                if (ScopeManager::instanceCounts_s[scope] == 0)
+                assert(ScopeManager::getInstanceCounts()[scope] >= 0);
+                if (ScopeManager::getInstanceCounts()[scope] < 0)
+                    ScopeManager::getInstanceCounts()[scope] = 0;
+
+                if (ScopeManager::getInstanceCounts()[scope] == 0)
                     this->deactivateListeners();
 
@@ -175,5 +175,5 @@
             void deactivateListeners()
             {
-                for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
+                for (typename std::set<ScopeListener*>::iterator it = ScopeManager::getListeners()[scope].begin(); it != ScopeManager::getListeners()[scope].end(); )
                 {
                     if ((*it)->bActivated_)
@@ -193,5 +193,5 @@
             static bool isActive()
             {
-                return (ScopeManager::instanceCounts_s[scope] > 0);
+                return (ScopeManager::getInstanceCounts()[scope] > 0);
             }
     };
