diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 6d14cabb3528866128a1783dc5ab436071703839..9c06c78f08305ba18b51fce688a4cc44dcc6ed55 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -384,6 +384,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t& eval_context) const
   jacob_map_t contemporaneous_jacobian;
   for (const auto& [indices, d1] : derivatives[1])
     {
+      auto &d11 = d1;
       int deriv_id = indices[1];
       if (getTypeByDerivID(deriv_id) == SymbolType::endogenous)
         {
@@ -393,7 +394,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t& eval_context) const
           double val {[&] {
             try
               {
-                return d1->eval(eval_context); // NOLINT(clang-analyzer-core.NullDereference)
+                return d11->eval(eval_context); // NOLINT(clang-analyzer-core.NullDereference)
               }
             catch (ExprNode::EvalExternalFunctionException& e)
               {
@@ -1972,11 +1973,14 @@ ModelTree::initializeMEXCompilationWorkers(int numworkers, const filesystem::pat
               mex_compilation_done.insert(output);
   */
             /* The object just compiled may be a prerequisite for several
+            mex_compilation_done.insert(output);
+  */    
+        /* The object just compiled may be a prerequisite for several
                other objects, so notify all waiting workers. Also needed to
                notify the main thread when in
                ModelTree::waitForMEXCompilationWorkers().*/
   /*
-    mex_compilation_cv.notify_all();
+      mex_compilation_cv.notify_all();
           }
     });
   */