diff --git a/ExprNode.cc b/ExprNode.cc
index ad012b907d510589039c7accf8e49560be59d405..d7d8374c5b832bd7712863be6e678d13e91afa03 100644
--- a/ExprNode.cc
+++ b/ExprNode.cc
@@ -5150,9 +5150,9 @@ ExternalFunctionNode::writeExternalFunctionOutput(ostream &output, ExprNodeOutpu
         {
           if (symb_id == first_deriv_symb_id
               && symb_id == second_deriv_symb_id)
-            output << "[TEF_" << indx << " TEFD_"<< indx << " TEFDD_"<< indx << "] = ";
+            output << "[TEF_" << indx << ", TEFD_"<< indx << ", TEFDD_"<< indx << "] = ";
           else if (symb_id == first_deriv_symb_id)
-            output << "[TEF_" << indx << " TEFD_"<< indx << "] = ";
+            output << "[TEF_" << indx << ", TEFD_"<< indx << "] = ";
           else
             output << "TEF_" << indx << " = ";