Fixed handling of missing optical spectra.