fixed one index bug