Fixed issue with negative NaN