fix bug in create_order