a few more places to special-case nan