Changed group save to remove groups not in the addToGroups list