fix plot_dist