Fix LEACH algorithm bug