fix ordering to order by primary order, then objectid