Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentClient.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentClient.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentClient.cs	(revision 5786)
@@ -22,17 +22,16 @@
 using System;
 using System.Collections.Generic;
+using System.Configuration;
+using System.IO;
 using System.Linq;
 using System.Threading;
 using HeuristicLab.Clients.Hive.Jobs;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Clients.Hive {
-  using System.Configuration;
-  using System.IO;
-  using HeuristicLab.Collections;
-  using HeuristicLab.PluginInfrastructure;
-
   /// <summary>
   /// An experiment which contains multiple batch runs of algorithms.
@@ -378,5 +377,5 @@
 
     #region HiveJob Events
-    void HiveJob_JobStateChanged(object sender, EventArgs e) {
+    private void HiveJob_JobStateChanged(object sender, EventArgs e) {
       if (HiveJob != null) {
         rootJobId = HiveJob.Job.Id;
@@ -520,20 +519,25 @@
         HiveJob hj = hiveJob.GetHiveJobByJobId(lightweightJob.Id);
         if (hj != null) {
+          DateTime lastJobDataUpdate = hj.Job.LastJobDataUpdate;
           hj.UpdateFromLightweightJob(lightweightJob);
-          if ((hj.Job.State == JobState.Aborted ||
-               hj.Job.State == JobState.Failed ||
-               hj.Job.State == JobState.Finished) &&
-              !hj.IsFinishedOptimizerDownloaded) {
+
+          // lastJobDataUpdate equals DateTime.MinValue right after it was uploaded. When the first results are polled, this value is updated
+          if (lastJobDataUpdate != DateTime.MinValue && lastJobDataUpdate < hj.Job.LastJobDataUpdate) {
             LogMessage(hj.Job.Id, "Downloading optimizer for job");
             OptimizerJob optimizerJob = LoadOptimizerJob(hj.Job.Id);
             if (optimizerJob == null) {
               // something bad happened to this job. set to finished to allow the rest beeing downloaded
-              hj.IsFinishedOptimizerDownloaded = true;
+              //hj.IsFinishedOptimizerDownloaded = true;
             } else {
-              if (lightweightJob.ParentJobId.HasValue) {
-                HiveJob parentHiveJob = HiveJob.GetHiveJobByJobId(lightweightJob.ParentJobId.Value);
-                parentHiveJob.UpdateChildOptimizer(optimizerJob, hj.Job.Id);
+              // if the job is paused, download but don't integrate into parent optimizer (to avoid Prepare)
+              if (hj.Job.State == JobState.Paused) {
+                
               } else {
-                this.HiveJob.IsFinishedOptimizerDownloaded = true;
+                if (lightweightJob.ParentJobId.HasValue) {
+                  HiveJob parentHiveJob = HiveJob.GetHiveJobByJobId(lightweightJob.ParentJobId.Value);
+                  parentHiveJob.UpdateChildOptimizer(optimizerJob, hj.Job.Id);
+                } else {
+                  //this.HiveJob.IsFinishedOptimizerDownloaded = true;
+                }
               }
             }
@@ -550,5 +554,8 @@
 
     private bool AllJobsFinished() {
-      return HiveJob.GetAllHiveJobs().All(hj => hj.IsFinishedOptimizerDownloaded);
+      //return HiveJob.GetAllHiveJobs().All(hj => hj.IsFinishedOptimizerDownloaded);
+      return HiveJob.GetAllHiveJobs().All(j => j.Job.State == JobState.Finished
+                                            || j.Job.State == JobState.Aborted
+                                            || j.Job.State == JobState.Failed);
     }
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobClient.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobClient.cs	(revision 5779)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobClient.cs	(revision 5786)
@@ -77,7 +77,7 @@
           DergisterOptimizerEvents();
           optimizerJob = value;
-          if (optimizerJob.ExecutionState == ExecutionState.Stopped) {
-            IsFinishedOptimizerDownloaded = true;
-          }
+          //if (optimizerJob.ExecutionState == ExecutionState.Stopped) {
+          //  IsFinishedOptimizerDownloaded = true;
+          //}
           RegisterOptimizerEvents();
           OnOptimizerJobChanged();
@@ -91,14 +91,14 @@
     }
 
-    private bool isFinishedOptimizerDownloaded;
-    public bool IsFinishedOptimizerDownloaded {
-      get { return isFinishedOptimizerDownloaded; }
-      set {
-        if (isFinishedOptimizerDownloaded != value) {
-          isFinishedOptimizerDownloaded = value;
-          OnIsFinishedOptimizerDownloadedChanged();
-        }
-      }
-    }
+    //private bool isFinishedOptimizerDownloaded;
+    //public bool IsFinishedOptimizerDownloaded {
+    //  get { return isFinishedOptimizerDownloaded; }
+    //  set {
+    //    if (isFinishedOptimizerDownloaded != value) {
+    //      isFinishedOptimizerDownloaded = value;
+    //      OnIsFinishedOptimizerDownloadedChanged();
+    //    }
+    //  }
+    //}
 
     private bool syncJobsWithOptimizers = true;
@@ -331,5 +331,5 @@
       }
       if (childIsFinishedOptimizerDownloaded) {
-        child.IsFinishedOptimizerDownloaded = true;
+        //child.IsFinishedOptimizerDownloaded = true; // todo: clean up with childIsFinishedOptimizerDownloaded
       }
       syncJobsWithOptimizers = true;
@@ -345,6 +345,38 @@
       }
       foreach (IRun run in optimizerJob.Optimizer.Runs) {
-        if (!batchRun.Runs.Contains(run))
+        if (!batchRun.Runs.Contains(run)) {
+          run.Name = GetNewRunName(run, batchRun.Runs);
           batchRun.Runs.Add(run);
+        }
+      }
+    }
+
+    /// <summary>
+    /// Parses the run numbers out of runs and renames the run to the next number
+    /// </summary>
+    private static string GetNewRunName(IRun run, RunCollection runs) {
+      int idx = run.Name.IndexOf("Run ") + 4;
+
+      if (idx == -1 || runs.Count == 0)
+        return run.Name;
+
+      int maxRunNumber = int.MinValue;
+      foreach (IRun r in runs) {
+        int number = GetRunNumber(r.Name);
+        maxRunNumber = Math.Max(maxRunNumber, number);
+      }
+
+      return run.Name.Substring(0, idx) + (maxRunNumber + 1).ToString();
+    }
+
+    /// <summary>
+    /// Parses the number of a Run out of its name. Example "Genetic Algorithm Run 3" -> 3
+    /// </summary>
+    private static int GetRunNumber(string runName) {
+      int idx = runName.IndexOf("Run ") + 4;
+      if (idx == -1) {
+        return 0;
+      } else {
+        return int.Parse(runName.Substring(idx, runName.Length - idx));
       }
     }
@@ -403,9 +435,11 @@
       if (lightweightJob != null) {
         job.Id = lightweightJob.Id;
-        job.Id = lightweightJob.Id;
+        job.ParentJobId = lightweightJob.ParentJobId;
         job.ExecutionTime = lightweightJob.ExecutionTime;
         job.State = lightweightJob.State;
         job.StateLog = new List<StateLog>(lightweightJob.StateLog);
-        // what about parentJob
+        job.Command = lightweightJob.Command;
+        job.LastJobDataUpdate = lightweightJob.LastJobDataUpdate;
+        
         OnJobStateChanged();
         OnToStringChanged();
