added check for missing agg ids