fixed a bug at comaring NaN and doubles