fix paralel indexing bug