index bug fixed.