bug fix in calculating group cutoffs