bug fix for reading in the index