dt calculation bug fixed