diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index 9233aeb05bcccf17b3700d70fc675802c0376c34..2ff25dc0dec927d3d9775cf0595d1a99cfeddf5b 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -5059,7 +5059,8 @@ ExtendedPathStatement::writeOutput(ostream& output, [[maybe_unused]] const strin
   options_list_new.erase("periods");
   options_list_new.writeOutput(output);
 
-  output << "extended_path([], " << periods << ", [], options_, M_, oo_);" << endl;
+  output << "[Simulated_time_series, oo_] = extended_path([], " << periods
+         << ", [], options_, M_, oo_);" << endl;
 }
 
 void