fix NaNs in minimum velocity enforcing code