Bug fix with NewPlot() function