Added check for groups