Fixed an index bug.