Fix for NaN conversion in stats