bug fix in PlotRes.py