fix timescale calc