BUG Fixed aggregate test not grouping correctly