fixing bug in grouper