added NaN test for trace