Fix grouping issues