Fatal index bug fixed