Fixed bug in distributed weights.