Fixing some of the group manipulation functions.