diff --git a/pub/CHANGELOG b/pub/CHANGELOG
index bc6ee9e62591ae88f3de2340ba0a4077781e1510..4aecd55e0c089d4a6e1cbd5b2ad7198d675ca98c 100644
--- a/pub/CHANGELOG
+++ b/pub/CHANGELOG
@@ -7,10 +7,10 @@
 Release 2.4.0b of 21apr17:
 
 - Modified functionality:
-  - sqrt, ln, lg return NaN outside their definition range
+  - sqrt, ln, lg return +-inf or nan outside their definition range
   - sqrt0, ln0, lg0 return 0 outside the definition range of the standard functions
 - Bug fix:
-  - detection of dy==0 for fit weighing was inverted
+  - correct inverted boolean dy==0 in fit weight mechanism
 
 Release 2.4.0a of 24mar17:
 
diff --git a/pub/lib/plot.cpp b/pub/lib/plot.cpp
index bbd42fe7065af275e01736b45f50ca2792c70214..51f1343026e0e3c9e02a6bca03dba76ddc660da0 100644
--- a/pub/lib/plot.cpp
+++ b/pub/lib/plot.cpp
@@ -111,7 +111,7 @@ namespace {
                 for (int i = 0; i < s->size(); i++) {
                     if (!plot->X.contains(s->x[i]))
                         continue;
-                    if (plot->Y.logflag && s->y[i] <= 0)
+                    if (!std::isfinite(s->y[i]) || plot->Y.logflag && s->y[i] <= 0)
                         continue;
                     if (s->y[i] < inf)
                         inf = s->y[i];