Fixed a bug causing dt to become calculated as nan or inf

 - Added checking for umax == 0
 - Clamp dt to between user specified min and max