Fixed null pointer exception when no aggregators are present in the query.