Changed the way the loop for the index analyzer is calculated.