Make the script work across groups.