fix groups bugs