Fix typo in index generation