Fixed problem where inflection points were slightly miscalculated.