fix issue with last_ts