Index: branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsPermutationCrossover.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsPermutationCrossover.cs	(revision 6350)
+++ branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsPermutationCrossover.cs	(revision 6569)
@@ -46,32 +46,36 @@
 
     protected override PrinsEncoding Crossover(IRandom random, PrinsEncoding parent1, PrinsEncoding parent2) {
-      //note - the inner crossover is called here and the result is converted to a prins representation
+      //note - the inner crossover is called here and the solution is converted to a prins representation
       //some refactoring should be done here in the future - the crossover operation should be called directly
 
-      InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
-      IAtomicOperation op = this.ExecutionContext.CreateOperation(
-        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
-      op.Operator.Execute((IExecutionContext)op, CancellationToken);
+      if (parent1.Length == parent2.Length) {
+        InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
+        IAtomicOperation op = this.ExecutionContext.CreateOperation(
+          InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
+        op.Operator.Execute((IExecutionContext)op, CancellationToken);
 
-      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
-      if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
-        Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
-        ExecutionContext.Scope.Variables.Remove(childName);
+        string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
+        if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
+          Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
+          ExecutionContext.Scope.Variables.Remove(childName);
 
-        return new PrinsEncoding(permutation, Cities,
-          DueTimeParameter.ActualValue,
-            ServiceTimeParameter.ActualValue,
-            ReadyTimeParameter.ActualValue,
-            DemandParameter.ActualValue,
-            CapacityParameter.ActualValue,
-            FleetUsageFactor.ActualValue,
-            TimeFactor.ActualValue,
-            DistanceFactor.ActualValue,
-            OverloadPenalty.ActualValue,
-            TardinessPenalty.ActualValue,
-            CoordinatesParameter.ActualValue,
-            UseDistanceMatrixParameter.ActualValue);
-      } else
-        return null;
+          return new PrinsEncoding(permutation, Cities,
+            DueTimeParameter.ActualValue,
+              ServiceTimeParameter.ActualValue,
+              ReadyTimeParameter.ActualValue,
+              DemandParameter.ActualValue,
+              CapacityParameter.ActualValue,
+              FleetUsageFactor.ActualValue,
+              TimeFactor.ActualValue,
+              DistanceFactor.ActualValue,
+              OverloadPenalty.ActualValue,
+              TardinessPenalty.ActualValue,
+              CoordinatesParameter.ActualValue,
+              UseDistanceMatrixParameter.ActualValue);
+        } else
+          return null;
+      } else {
+        return parent1.Clone() as PrinsEncoding;
+      }
     }
   }
Index: branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs	(revision 6350)
+++ branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs	(revision 6569)
@@ -75,4 +75,6 @@
     public override List<Tour> GetTours(ILookupParameter<DoubleMatrix> distanceMatrix, int maxVehicles = int.MaxValue) {
       List<Tour> result = new List<Tour>();
+
+      DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, distanceMatrix, useDistanceMatrix);
 
       //Split permutation into vector P
@@ -106,7 +108,5 @@
             overloadPenalty,
             tardinessPenalty,
-            coordinates,
-            distanceMatrix,
-            useDistanceMatrix);
+            distMatrix);
 
           double cost = eval.Quality;
