Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 5883)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 5884)
@@ -141,7 +141,4 @@
 	time_t now = time(NULL);
 	BOOST_FOREACH( LinkDescriptor* ld, links ) {
-		// remote used as relay flag
-		if ( ld->relaying && difftime( now, ld->timeRelaying ) > 10)
-			ld->relaying = false;
 
 		// keep alives and not up? yes-> link connection request is stale!
@@ -160,4 +157,8 @@
 
 		if (!ld->up) continue;
+
+		// remote used as relay flag
+		if ( ld->relaying && difftime( now, ld->timeRelaying ) > 10)
+			ld->relaying = false;
 
 		// drop links that are dropped and not used as relay
@@ -240,9 +241,13 @@
 	} else {
 		// destinastion myself? yes-> handle message
-		if (message->getDestinationNode() == nodeId)
-			handleMessage( message, NULL );
-		else
+		if (message->getDestinationNode() == nodeId) {
+			logging_warn("Usually I should not route messages to myself!");
+			Message msg;
+			msg.encapsulate(message);
+			handleMessage( &msg, NULL );
+		} else {
 			// no->send message to next hop
 			send( message, message->getDestinationNode() );
+		}
 	}
 }
@@ -331,6 +336,6 @@
 	const ServiceID& service) {
 	message->setSourceNode(nodeId);
+	message->setDestinationNode(remote);
 	message->setService(service);
-	message->setDestinationNode(remote);
 	send( message, remote );
 }
@@ -343,8 +348,10 @@
 	}
 	message->setSourceNode(nodeId);
+	message->setDestinationNode(ld->remoteNode);
+
 	message->setSourceLink(ld->overlayId);
+	message->setDestinationLink(ld->remoteLink);
+
 	message->setService(ld->service);
-	message->setDestinationNode(ld->remoteNode);
-	message->setDestinationLink(ld->remoteLink);
 	return send( message, ld, ignore_down );
 }
@@ -1476,9 +1483,9 @@
 	if( overlayMsg == NULL ) return false;
 
+	// increase number of hops
+	overlayMsg->increaseNumHops();
+
 	// refresh relay information
 	refreshRelayInformation( overlayMsg, ld );
-
-	// increase number of hops
-	overlayMsg->increaseNumHops();
 
 	// update route record
@@ -1500,5 +1507,4 @@
 			<< " to " << overlayMsg->getDestinationNode()
 		);
-
 		route( overlayMsg );
 		delete overlayMsg;
Index: source/ariba/overlay/modules/chord/Chord.cpp
===================================================================
--- source/ariba/overlay/modules/chord/Chord.cpp	(revision 5883)
+++ source/ariba/overlay/modules/chord/Chord.cpp	(revision 5884)
@@ -249,11 +249,16 @@
 			baseoverlay.dropLink(item->info);
 		item->info = lnk;
+
 		// discover neighbors of new overlay neighbor
-		discover_neighbors( lnk );
 		showLinks();
 	} else { // no-> add orphan entry to routing table
 		logging_info("new orphan: " << remote.toString()
 				<< " with link " << lnk.toString());
-		table->insert_orphan(remote)->info = lnk;
+		item = table->insert_orphan(remote);
+
+		// replace with new link
+		if (!item->info.isUnspecified() || item->info!=lnk)
+			baseoverlay.dropLink(item->info);
+		item->info = lnk;
 	}
 
@@ -373,5 +378,7 @@
 					item = table->get(*table->get_predesessor());
 			}
-			if (item == NULL) break;
+			if (item == NULL)
+				break;
+
 			logging_debug("Routing discovery message to succ/pred "
 				<< item->id.toString() );
