fixed issue with incorrect spectra indicies