fix another bug in delete_order