index bug

fixed index bug