Fix weights: references to ref.weights => .ref.weights