Fix bug in index name creation