Fix case of Infinits and NaN in statistics