Plotting error fix