update for NaN comparison, fixes #3