Improve data format of the "groups" scope

The gid is stored as an integer now instead of a string.