Added check for missing spectra