fix bug in plot.TS