Fixed rounding-error bug.