fix local peer discovery; the join/leave mechanism was messed up