Trying to fix text indexing