Changed -inf to NaN