fix t=n*dt error in both