Fixed indexing for repository