Add proper support for groups