fix bug in order_schedule