isinf is nan fix