Bug fixes to plot.