fixed exception when time is non-monotonic