fixing the validation check for agg fields