bug fixed for integrated spectra