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

Signed-off-by: Nicola Ferralis <feranick@hotmail.com>
Increased default of integration window from 10 to a more realistic 20.

Signed-off-by: Nicola Ferralis <feranick@hotmail.com>