Replaced "ALL_PROFS" flag with a check if profs array is empty