fixed a bug in calc_dt