Fixed bugs in group filtering.