indexing script fixes