modify list index bug