Use proper type for the index.