Fixed Hang/Crash when integration hits a "cannot convert float NaN to integer"