fix error = 9999 in the plot
small fix