Fix a bug that wrong index name is used