fixed bugs for qaf_y_of_x_dist_curve