grouping bug fix