fix a index bug