Fix Bug about index in previous version