Index: /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs
===================================================================
--- /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs	(revision 16656)
+++ /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs	(revision 16657)
@@ -60,4 +60,6 @@
       var neighbourhoodSelectionProbability = NeighbourhoodSelectionProbability;
       var rand = RandomParameter.Value;
+      var normalizeObjectives = NormalizeObjectives;
+      var maximumNumberOfReplacedSolutions = MaximumNumberOfReplacedSolutions;
 
       // cancellation token for the inner operations which should not be immediately cancelled
@@ -103,5 +105,5 @@
             NadirPoint.UpdateNadir(childSolution.Qualities);
             // update neighbourhood will insert the child into the population
-            UpdateNeighbourHood(rand, childSolution, subProblemId, neighbourType);
+            UpdateNeighbourHood(rand, childSolution, subProblemId, neighbourType, maximumNumberOfReplacedSolutions, normalizeObjectives);
 
             ++evaluatedSolutions;
Index: /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs
===================================================================
--- /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs	(revision 16656)
+++ /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs	(revision 16657)
@@ -166,4 +166,5 @@
     public new IMultiObjectiveHeuristicOptimizationProblem Problem {
       get { return (IMultiObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
     }
     public int Seed {
@@ -472,5 +473,5 @@
     }
 
-    protected void UpdateNeighbourHood(IRandom random, IMOEADSolution individual, int subProblemId, NeighborType neighbourType) {
+    protected void UpdateNeighbourHood(IRandom random, IMOEADSolution individual, int subProblemId, NeighborType neighbourType, int maximumNumberOfReplacedSolutions, bool normalizeObjectives = false) {
       int replacedSolutions = 0;
       int size = neighbourType == NeighborType.NEIGHBOR ? NeighbourSize : population.Length;
@@ -481,6 +482,6 @@
           : i;
 
-        double f1 = CalculateFitness(population[k].Qualities, lambda[k]);
-        double f2 = CalculateFitness(individual.Qualities, lambda[k]);
+        double f1 = CalculateFitness(population[k].Qualities, lambda[k], normalizeObjectives);
+        double f2 = CalculateFitness(individual.Qualities, lambda[k], normalizeObjectives);
 
         if (f2 < f1) {
@@ -489,5 +490,5 @@
         }
 
-        if (replacedSolutions >= MaximumNumberOfReplacedSolutions) {
+        if (replacedSolutions >= maximumNumberOfReplacedSolutions) {
           return;
         }
@@ -495,5 +496,5 @@
     }
 
-    private double CalculateFitness(double[] qualities, double[] lambda) {
+    private double CalculateFitness(double[] qualities, double[] lambda, bool normalizeObjectives = false) {
       int dim = qualities.Length;
       switch (functionType) {
@@ -502,10 +503,17 @@
 
             for (int n = 0; n < dim; n++) {
-              var diff = qualities[n] - IdealPoint[n];
-              if (NormalizeObjectives) {
-                diff /= NadirPoint[n] - IdealPoint[n];
+              // deal with NaN and Infinity 
+              var q = qualities[n];
+              if (double.IsNaN(q) || double.IsInfinity(q)) {
+                q = NadirPoint[n];
               }
+              q -= IdealPoint[n];
+
+              if (normalizeObjectives) {
+                q /= NadirPoint[n] - IdealPoint[n];
+              }
+
               var l = lambda[n].IsAlmost(0) ? 1e-4 : lambda[n];
-              var feval = l * Math.Abs(diff);
+              var feval = l * Math.Abs(q);
 
               if (feval > maxFun) {
@@ -562,5 +570,5 @@
     protected void UpdateParetoFronts() {
       var qualities = population.Select(x => Enumerable.Range(0, NadirPoint.Length).Select(i => x.Qualities[i] / NadirPoint[i]).ToArray()).ToArray();
-      var maximization = Enumerable.Repeat(false, IdealPoint.Length).ToArray(); // MOEA/D minimizes everything internally\
+      var maximization = Enumerable.Repeat(false, IdealPoint.Length).ToArray(); // MOEA/D minimizes everything internally
       var pf = DominationCalculator<IMOEADSolution>.CalculateBestParetoFront(population, qualities, maximization);
 
@@ -638,6 +646,6 @@
           }
           var r = OnlinePearsonsRCalculator.Calculate(points.Select(x => x.X), points.Select(x => x.Y), out OnlineCalculatorError error);
-          if (error != OnlineCalculatorError.None) { r = double.NaN; }
-          sp.Name = $"Pareto Front [{c[0]}, {c[1]}], correlation: {r.ToString("N2")}";
+          var r2 = r * r;
+          sp.Name = $"Pareto Front [{c[0]}, {c[1]}], correlation: {r2.ToString("N2")}";
         }
       }
Index: /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/Plugin.cs.frame
===================================================================
--- /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/Plugin.cs.frame	(revision 16656)
+++ /branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/Plugin.cs.frame	(revision 16657)
@@ -35,4 +35,6 @@
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.TestFunctions.MultiObjective", "3.3")]
   public class HeuristicLabAlgorithmsMOEADPlugin : PluginBase {
   }
