Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs	(revision 2728)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs	(revision 2729)
@@ -227,11 +227,12 @@
     public override object Clone(IDictionary<Guid, object> clonedObjects) {
       Function clone = (Function)base.Clone(clonedObjects);
-      clone.initializer = (IOperator)Auxiliary.Clone(initializer, clonedObjects);
-      clone.manipulator = (IOperator)Auxiliary.Clone(manipulator, clonedObjects);
-      clone.maxArity = maxArity;
-      clone.minArity = minArity;
-      clone.minTreeHeight = minTreeHeight;
-      clone.minTreeSize = minTreeSize;
-      clone.tickets = tickets;
+      if (initializer != null) clone.initializer = (IOperator)Auxiliary.Clone(initializer, clonedObjects);
+      else clone.initializer = null;
+      if (manipulator != null) clone.manipulator = (IOperator)Auxiliary.Clone(manipulator, clonedObjects);
+      else clone.manipulator = null;
+      clone.MaxSubTrees = maxArity;
+      clone.MinSubTrees = minArity;
+      clone.Tickets = tickets;
+      clone.allowedSubFunctions.Clear();
       for (int i = 0; i < MaxSubTrees; i++) {
         var allowedSubFunctionsForSlot = new List<IFunction>();
@@ -252,4 +253,8 @@
       node.Attributes.Append(minSubTreesAttr);
       node.Attributes.Append(maxSubTreesAttr);
+      if (initializer != null)
+        node.AppendChild(PersistenceManager.Persist("Initializer", initializer, document, persistedObjects));
+      if (manipulator != null)
+        node.AppendChild(PersistenceManager.Persist("Manipulator", manipulator, document, persistedObjects));
       for (int i = 0; i < MaxSubTrees; i++) {
         XmlNode slotNode = document.CreateElement("AllowedSubFunctions");
@@ -269,4 +274,11 @@
       MinSubTrees = XmlConvert.ToInt32(node.Attributes["MinSubTrees"].Value);
       MaxSubTrees = XmlConvert.ToInt32(node.Attributes["MaxSubTrees"].Value);
+      if (node.SelectSingleNode("Initializer") != null) {
+        initializer = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Initializer"), restoredObjects);
+      }
+      if (node.SelectSingleNode("Manipulator") != null) {
+        manipulator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Manipulator"), restoredObjects);
+      }
+      foreach (var subFunctionsList in allowedSubFunctions) subFunctionsList.Clear();
       foreach (XmlNode allowedSubFunctionsNode in node.SelectNodes("AllowedSubFunctions")) {
         int slot = XmlConvert.ToInt32(allowedSubFunctionsNode.Attributes["Slot"].Value);
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2728)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2729)
@@ -76,4 +76,21 @@
       return new FunctionLibraryInjectorView(this);
     }
+
+    #region persistence
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      FunctionLibraryInjectorBase clone = (FunctionLibraryInjectorBase)base.Clone(clonedObjects);
+      clone.functionLibrary = (FunctionLibrary)Auxiliary.Clone(functionLibrary, clonedObjects);
+      return clone;
+    }
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      node.AppendChild(PersistenceManager.Persist("FunctionLibrary", FunctionLibrary, document, persistedObjects));
+      return node;
+    }
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      functionLibrary = (FunctionLibrary)PersistenceManager.Restore(node.SelectSingleNode("FunctionLibrary"), restoredObjects);
+    }
+    #endregion
   }
 }
