added better error handling when tmin is larger than the actual integration range