Fixed the crash when deleting a cell

In fact, we need to reference a global array. Otherwise when counting
with a fix number of rows makes no sense, so it crashes.