fix pmi reweighting