Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest2.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest2.cs	(revision 9756)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest2.cs	(revision 9757)
@@ -35,5 +35,4 @@
             break;
           }
-
         }
       }
@@ -45,5 +44,4 @@
             break;
           }
-
         }
       }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/AfterCrossoverSolutionCachingAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/AfterCrossoverSolutionCachingAnalyzer.cs	(revision 9756)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/AfterCrossoverSolutionCachingAnalyzer.cs	(revision 9757)
@@ -96,5 +96,5 @@
       info.ParentList.Add(p1Pw);
       info.ParentList.Add(p2Pw);
-      solDict.Add(new PermutationWrapper(solution), info);
+      solDict.Add(new PermutationWrapper((Permutation)solution.Clone(new Cloner())), info);
 
       return base.Apply();
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationInformation.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationInformation.cs	(revision 9756)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationInformation.cs	(revision 9757)
@@ -37,6 +37,10 @@
     [Storable]
     public int Generation { get; set; }
+    [Storable]
+    PermutationWrapperEqualityComparer pweq;
 
-    public PermutationInformation() { }
+    public PermutationInformation() {
+      pweq = new PermutationWrapperEqualityComparer();
+    }
 
     [StorableConstructor]
@@ -47,4 +51,5 @@
       this.ParentList = new List<PermutationWrapper>(original.ParentList);
       this.Generation = original.Generation;
+      this.pweq = new PermutationWrapperEqualityComparer();
     }
 
@@ -52,4 +57,39 @@
       return new PermutationInformation(this, cloner);
     }
+
+    public override int GetHashCode() {
+      //use rotating hash, should be enough
+      //see: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
+      int h = 0;
+
+      h = (h << 4) ^ (h >> 28) ^ ProducedBy.GetHashCode();
+      h = (h << 4) ^ (h >> 28) ^ Generation.GetHashCode();
+
+      if (ParentList != null) {
+        foreach (var parent in ParentList) {
+          h = (h << 4) ^ (h >> 28) ^ pweq.GetHashCode(parent);
+        }
+      }
+
+      return h;
+    }
+
+    public override bool Equals(object obj) {
+      PermutationInformation pi = obj as PermutationInformation;
+
+      if (ProducedBy == pi.ProducedBy && Generation == pi.Generation) {
+        if (pi.ParentList == null && ParentList == null) return true;
+        if (pi.ParentList != null && ParentList == null ||
+          pi.ParentList == null && ParentList != null) return false;
+        if (pi.ParentList.Count != ParentList.Count) return false;
+
+        foreach (var p in ParentList) {
+          if (!pi.ParentList.Contains(p)) return false;
+        }
+        return true;
+      } else {
+        return false;
+      }
+    }
   }
 }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs	(revision 9756)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs	(revision 9757)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -34,8 +33,15 @@
     [Storable]
     protected Dictionary<PermutationWrapper, List<PermutationInformation>> solutionDictionary;
-    public Dictionary<PermutationWrapper, List<PermutationInformation>> SolutionDictionary { get { return solutionDictionary; } }
+
+    public Dictionary<PermutationWrapper, List<PermutationInformation>> SolutionDictionary {
+      get { return solutionDictionary; }
+    }
+
+    [Storable]
+    PermutationEqualityComparer peq;
 
     public PermutationSolutionDictionary() {
       solutionDictionary = new Dictionary<PermutationWrapper, List<PermutationInformation>>(new PermutationWrapperEqualityComparer());
+      peq = new PermutationEqualityComparer();
     }
 
@@ -45,4 +51,5 @@
       : base(original, cloner) {
       this.solutionDictionary = new Dictionary<PermutationWrapper, List<PermutationInformation>>(original.solutionDictionary, new PermutationWrapperEqualityComparer());
+      this.peq = new PermutationEqualityComparer();
     }
 
@@ -105,13 +112,5 @@
 
     public PermutationWrapper GetPermutationWrapperOfPermutation(Permutation permutation) {
-      PermutationEqualityComparer peq = new PermutationEqualityComparer();
-      var res = solutionDictionary.Where(x => peq.GetHashCode(x.Key.GetPermutation()) == peq.GetHashCode(permutation));
-
-      //TODO: fix this
-      if (res.Count() > 1) {
-        throw new Exception("ERROR: Cannot conatin duplicates!");
-      }
-
-      return res.First().Key;
+      return solutionDictionary.Single(x => peq.GetHashCode(x.Key.GetPermutation()) == peq.GetHashCode(permutation)).Key;
     }
 
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs	(revision 9756)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs	(revision 9757)
@@ -93,5 +93,5 @@
         info.ProducedBy = ProducedBy.Mutation;
         
-        solDict.Add(new PermutationWrapper(sol), info);
+        solDict.Add(new PermutationWrapper((Permutation)sol.Clone(new Cloner())), info);
       }
       return base.Apply();
