Fix handling of negative values in fraction_slope.