problem when a node left and joined

when nodes were leaving they were not properly being removed from the
network