Fixed a small issue with NaN comparison