fix for segmentation fault error in Plotter