Calculate *dt* correctly