fixing error during interpolation of spectra with zero signal