fixed grouping issue