Fix a problem with index