fixed crash and apply delete cells.