Fixed memory leak in the case of bad fit values. Also fixed it so that we should still save the spectra associated with poor fits.