fixed bugs in groups controller