fix bug in delete order