fixed the index chunking