fixed bug so that it can merge two nodes that are connected, but disconnected from the rest of the network