I assume this is because slope_*x + intercept_ is sometimes negative. Have you checked that with your x values?
slope_*x + intercept_
x