fix bug in grouping expansion transformation