fixed crash caused by inconsistent cell count

cell count should be consistent before/after deleting any rows