Fix time series

Needs work. There is probably a more elegant way.