re-add NaN possible fix. The original works for Mac, not for linux