Fixed bug in slope when we inversed an already negative slope, it would
return another engative slope instead of a positive one.