fixing minor gossip algorithm bug