fixed errors for rendering XYPlot