fixed indexing issue when deleting multiple out-of-order entries