fixed plot_close