diff --git a/src/main/java/water/exec/ASTOp.java b/src/main/java/water/exec/ASTOp.java
index <HASH>..<HASH> 100644
--- a/src/main/java/water/exec/ASTOp.java
+++ b/src/main/java/water/exec/ASTOp.java
@@ -718,8 +718,8 @@ abstract class ASTBinOp extends ASTOp {
                   if(chks[i].isNA0(r)) { n.addNum(Double.NaN); continue; }
                   rv = chks[i].at0(r);
                 } else {
-                  if (Double.isNaN(df0)) { n.addNum(Double.NaN); continue; }
-                  rv = df0;
+                  if (Double.isNaN(df1)) { n.addNum(Double.NaN); continue; }
+                  rv = df1;
                 }
                 n.addNum(bin.op(lv, rv));
               }
missed the RHS double in the ASTBinOp