Index: trunk/src/lib/network/message_manager.cc
===================================================================
--- trunk/src/lib/network/message_manager.cc	(revision 9008)
+++ trunk/src/lib/network/message_manager.cc	(revision 9059)
@@ -58,4 +58,8 @@
   
   messageQueue.clear();
+  
+  this->messageHandlerMap.clear();
+  
+  MessageManager::singletonRef = NULL;
 }
 
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 9008)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 9059)
@@ -77,4 +77,6 @@
   
   PlayerStats::deleteAllPlayerStats();
+  
+  NetworkGameManager::singletonRef = NULL;
 }
 
@@ -274,10 +276,15 @@
     if ( State::getPlayer()->getPlayable() != *it )
     {
-      PRINTF(0)("Delete unused playable: %s owner: %d\n", (*it)->getClassName(), (*it)->getOwner() );
-      std::list<Playable*>::iterator delit = it;
-      it++;
-      delete *delit;
-      playablesToDelete.erase( delit );
-      continue;
+      const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
+       
+      if ( list && std::find( list->begin(), list->end(), *it ) != list->end() )
+      {      
+        PRINTF(0)("Delete unused playable: %s owner: %d\n", (*it)->getClassName(), (*it)->getOwner() );
+        std::list<Playable*>::iterator delit = it;
+        it++;
+        delete *delit;
+        playablesToDelete.erase( delit );
+        continue;
+      }
     }
     it++;
Index: trunk/src/lib/network/network_manager.cc
===================================================================
--- trunk/src/lib/network/network_manager.cc	(revision 9008)
+++ trunk/src/lib/network/network_manager.cc	(revision 9059)
@@ -52,5 +52,4 @@
   /* initialize the references */
   this->networkStream = NULL;
-  this->sharedNetworkData = SharedNetworkData::getInstance();
   this->elapsedTime = 0.0f;
   
@@ -70,4 +69,5 @@
 NetworkManager::~NetworkManager()
 {
+  PRINTF(0)("NetworkManager destructor\n");
   if ( this->networkStream )
   {
@@ -75,4 +75,6 @@
     this->networkStream = NULL;
   }
+  
+  NetworkManager::singletonRef = NULL;
 }
 
@@ -103,5 +105,5 @@
 {
   this->networkStream = new NetworkStream( name, port );
-  this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
+  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
   this->networkStream->startHandshake();
   return 1;
@@ -115,8 +117,8 @@
 int NetworkManager::createServer(unsigned int port)
 {
-  this->sharedNetworkData->setHostID(0);
-  this->sharedNetworkData->setGameServer(true);
+  SharedNetworkData::getInstance()->setHostID(0);
+  SharedNetworkData::getInstance()->setGameServer(true);
   this->networkStream = new NetworkStream(port);
-  this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
+  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
   this->networkStream->createNetworkGameManager();
   PRINTF(0)("CREATE SERVER\n");
@@ -144,5 +146,5 @@
   this->elapsedTime = 0.0f;
 
-//  if ( networkStream->isActive() )
+  if ( networkStream )
     networkStream->processData();
   
Index: trunk/src/lib/network/network_manager.h
===================================================================
--- trunk/src/lib/network/network_manager.h	(revision 9008)
+++ trunk/src/lib/network/network_manager.h	(revision 9059)
@@ -40,6 +40,6 @@
 
     /** Returns the hostID @return The hostID of the object */
-    inline int getHostID() { return this->sharedNetworkData->getHostID(); }
-    inline bool isGameServer() { return this->sharedNetworkData->isGameServer(); }
+    inline int getHostID() { return SharedNetworkData::getInstance()->getHostID(); }
+    inline bool isGameServer() { return SharedNetworkData::getInstance()->isGameServer(); }
 
 
@@ -58,5 +58,4 @@
     NetworkStream*                   networkStream;       //!< pointer to network stream
 
-    SharedNetworkData*               sharedNetworkData;       //!< reference to the shared data
     float                            elapsedTime;             //!< elapsed time since the last network update
 };
Index: trunk/src/lib/network/network_stream.cc
===================================================================
--- trunk/src/lib/network/network_stream.cc	(revision 9008)
+++ trunk/src/lib/network/network_stream.cc	(revision 9059)
@@ -111,5 +111,4 @@
     serverSocket = NULL;
   }
-
   for ( PeerList::iterator i = peers.begin(); i!=peers.end(); i++)
   {
@@ -133,5 +132,4 @@
     }
   }
-  
   for ( SynchronizeableList::const_iterator it = getSyncBegin(); it != getSyncEnd(); it ++ )
     (*it)->setNetworkStream( NULL );
