Index: src/Actions/FragmentationAction/MolecularDynamicsAction.cpp
===================================================================
--- src/Actions/FragmentationAction/MolecularDynamicsAction.cpp	(revision a58c16f47065e9446b7916a407271c6544180022)
+++ src/Actions/FragmentationAction/MolecularDynamicsAction.cpp	(revision 10aee4386f0c1b8e07b3a74e7d97d99ef2622bc8)
@@ -62,14 +62,14 @@
   // present. If not, we still copy the position cleanly into a new step where then
   // forces are set according to summed fragmentary contributions. This is much cleaner.
-  prototype_actions.addAction(AR.getActionByName(std::string("verlet-integration")));
-  prototype_actions.addAction(AR.getActionByName(std::string("output")));
-  prototype_actions.addAction(AR.getActionByName(std::string("clear-fragment-results")));
-  prototype_actions.addAction(AR.getActionByName(std::string("destroy-adjacency")));
-  prototype_actions.addAction(AR.getActionByName(std::string("create-adjacency")));
-  prototype_actions.addAction(AR.getActionByName(std::string("correct-bonddegree")));
-  prototype_actions.addAction(AR.getActionByName(std::string("update-molecules")));
-  prototype_actions.addAction(AR.getActionByName(std::string("fragment-molecule")));
-  prototype_actions.addAction(AR.getActionByName(std::string("fragment-automation")));
-  prototype_actions.addAction(AR.getActionByName(std::string("analyse-fragment-results")));
+  prototype_actions.addAction(AR.getActionByName(std::string("verlet-integration")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("output")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("clear-fragment-results")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("destroy-adjacency")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("create-adjacency")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("correct-bonddegree")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("update-molecules")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("fragment-molecule")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("fragment-automation")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("analyse-fragment-results")).clone());
   isPrepared = true;
 }
@@ -78,5 +78,7 @@
 {
   // empty sequence
-  while (prototype_actions.removeLastAction() != NULL);
+  Action *actionremove = NULL;
+  while ((actionremove = prototype_actions.removeLastAction()) != NULL)
+    delete actionremove;
   isPrepared = false;
 }
Index: src/Actions/FragmentationAction/StructuralOptimizationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/StructuralOptimizationAction.cpp	(revision a58c16f47065e9446b7916a407271c6544180022)
+++ src/Actions/FragmentationAction/StructuralOptimizationAction.cpp	(revision 10aee4386f0c1b8e07b3a74e7d97d99ef2622bc8)
@@ -62,14 +62,14 @@
   // present. If not, we still copy the position cleanly into a new step where then
   // forces are set according to summed fragmentary contributions. This is much cleaner.
-  prototype_actions.addAction(AR.getActionByName(std::string("destroy-adjacency")));
-  prototype_actions.addAction(AR.getActionByName(std::string("create-adjacency")));
-  prototype_actions.addAction(AR.getActionByName(std::string("correct-bonddegree")));
-  prototype_actions.addAction(AR.getActionByName(std::string("update-molecules")));
-  prototype_actions.addAction(AR.getActionByName(std::string("fragment-molecule")));
-  prototype_actions.addAction(AR.getActionByName(std::string("fragment-automation")));
-  prototype_actions.addAction(AR.getActionByName(std::string("analyse-fragment-results")));
-  prototype_actions.addAction(AR.getActionByName(std::string("force-annealing")));
-  prototype_actions.addAction(AR.getActionByName(std::string("output")));
-  prototype_actions.addAction(AR.getActionByName(std::string("clear-fragment-results")));
+  prototype_actions.addAction(AR.getActionByName(std::string("destroy-adjacency")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("create-adjacency")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("correct-bonddegree")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("update-molecules")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("fragment-molecule")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("fragment-automation")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("analyse-fragment-results")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("force-annealing")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("output")).clone());
+  prototype_actions.addAction(AR.getActionByName(std::string("clear-fragment-results")).clone());
   isPrepared = true;
 }
@@ -78,5 +78,7 @@
 {
   // empty sequence
-  while (prototype_actions.removeLastAction() != NULL);
+  Action *actionremove = NULL;
+  while ((actionremove = prototype_actions.removeLastAction()) != NULL)
+    delete actionremove;
   isPrepared = false;
 }
