Set lastTS to right value