fix the problem of order-by clauses being ignored