fix broken weighting