fixed indexing of data structure for row removal.