Found a type conversion bug on dt that set dt=0.