Fix bug condition in getDt()