fixed issue with groups and uniqueness