some fixes to plot_grarphs