Fixed NaN conditional