Add sort to timeseries. Fix #208.