fixed bug in plotter