fmal bug fix: nan input should not raise exception