fix checks for NaN, jnthn++