Fixed a typo in the plotting function