fix bug in make_plot