fix bugs in orders

fix bugs in orders