Further increased the error checking to prevent wild wavelength solutions