Fix tests for grouping