Index: branches/network/src/lib/network/handshake.cc
===================================================================
--- branches/network/src/lib/network/handshake.cc	(revision 6061)
+++ branches/network/src/lib/network/handshake.cc	(revision 6062)
@@ -38,5 +38,5 @@
 void Handshake::writeBytes( const byte * data, int length )
 {
-  PRINTF(0)("Handshake::writeBytes states = %d %d %d %d (%d)\n", hasState( HS_RECVD_INIT ), hasState( HS_RECVD_VER ), hasState( HS_RECVD_HID ), hasState( HS_COMPLETED ), state);
+  PRINTF(5)("Handshake::writeBytes states = %d %d %d %d (%d)\n", hasState( HS_RECVD_INIT ), hasState( HS_RECVD_VER ), hasState( HS_RECVD_HID ), hasState( HS_COMPLETED ), state);
 
   if ( hasState( HS_COMPLETED ) )
@@ -86,5 +86,5 @@
   }
 
-  if ( hasState( HS_RECVD_VER ) && !hasState( HS_RECVD_HID ) )
+  if ( !isServer() && hasState( HS_RECVD_VER ) && !hasState( HS_RECVD_HID ) )
   {
     if ( length != 4 )
@@ -107,5 +107,5 @@
 int Handshake::readBytes( byte * data, int maxLength, int * reciever )
 {
-  PRINTF(0)("Handshake::readBytes states = %d %d %d %d (%d)\n", hasState( HS_SENT_INIT ), hasState( HS_SENT_VER ), hasState( HS_SENT_HID ), hasState( HS_COMPLETED ), state);
+  PRINTF(5)("Handshake::readBytes states = %d %d %d %d (%d)\n", hasState( HS_SENT_INIT ), hasState( HS_SENT_VER ), hasState( HS_SENT_HID ), hasState( HS_COMPLETED ), state);
 
   if ( hasState( HS_COMPLETED ) )
Index: branches/network/src/lib/network/network_socket.cc
===================================================================
--- branches/network/src/lib/network/network_socket.cc	(revision 6061)
+++ branches/network/src/lib/network/network_socket.cc	(revision 6062)
@@ -159,5 +159,5 @@
 int NetworkSocket::writeBytes(byte * data, int length)
 {
-  PRINTF(0)("NetworkSocket::writeBytes()\n");
+  PRINTF(5)("NetworkSocket::writeBytes()\n");
 #ifdef _USE_OUTGOING_BUFFER
 
@@ -207,5 +207,5 @@
 int NetworkSocket::readBytes(byte * data, int length)
 {
-  PRINTF(0)("NetworkSocket::readBytes()\n");
+  PRINTF(5)("NetworkSocket::readBytes()\n");
   if (data==NULL)
     return 0;
@@ -311,5 +311,4 @@
   {
     SDL_mutexV(self->threadTerminationMutex);
-    delete self;
   }
   else
@@ -380,5 +379,4 @@
   {
     SDL_mutexV(self->threadTerminationMutex);
-    delete self;
   }
   else
@@ -394,5 +392,5 @@
 bool NetworkSocket::writePacket( byte * data, int length )
 {
-  PRINTF(0)("NetworkSocket::writePacket()\n");
+  PRINTF(5)("NetworkSocket::writePacket()\n");
   if (length>255)
   {
@@ -409,5 +407,5 @@
 int NetworkSocket::readPacket( byte * data, int maxLength )
 {
-  PRINTF(0)("NetworkSocket::readPacket()\n");
+  PRINTF(5)("NetworkSocket::readPacket()\n");
   if (incomingBufferLength<1)
   {
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 6061)
+++ branches/network/src/lib/network/network_stream.cc	(revision 6062)
@@ -122,4 +122,5 @@
 {
   this->synchronizeables.push_back(&sync);
+  sync.setNetworkStream( this );
 
   if( this->networkSockets.size()>0 )
@@ -155,4 +156,6 @@
           }
           PRINT(0)("handshake finished\n");
+          delete handshakes[i];
+          handshakes[i] = NULL;
           //TODO: replace handshake by entitymanager
         }
@@ -176,5 +179,5 @@
   {
     //TODO: remove items from synchronizeables if they dont exist
-    if ( (*it)!=NULL  && ClassList::exists(*it) && (*it)->getOwner() == myHostId )
+    if ( (*it)!=NULL && (*it)->getOwner() == myHostId )
     {
       do {
@@ -197,5 +200,5 @@
           if ( networkSockets[reciever] != NULL )
           {
-            PRINTF(0)("write %d bytes to socket %d\n", dataLength, reciever);
+            PRINTF(5)("write %d bytes to socket %d\n", dataLength, reciever);
             networkSockets[reciever]->writePacket(downBuffer, dataLength);
           }
@@ -211,5 +214,5 @@
             if ( networkSockets[i] != NULL )
             {
-              PRINTF(0)("write %d bytes to socket %d\n", dataLength, reciever);
+              PRINTF(5)("write %d bytes to socket %d\n", dataLength, reciever);
               networkSockets[i]->writePacket(downBuffer, dataLength);
             }
@@ -366,5 +369,6 @@
       networkSockets[i] = NULL;
       //TODO: delete handshake from synchronizeable list so i can delete it
-      delete handshakes[i];
+      if ( handshakes[i] )
+        delete handshakes[i];
       handshakes[i] = NULL;
 
