Corrected bug with spreadsheet index