fix a stupid bug of index