(Minor) Corrected typo: use index name instead of variable