Map.fitByWeights algorithm corrected
Map.fitByWeights algorithm corrected