Fix bug in adding new groups