Change use of maxdim to order.