Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive/3.3/HiveJobs/OptimizerHiveTask.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive/3.3/HiveJobs/OptimizerHiveTask.cs	(revision 6988)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive/3.3/HiveJobs/OptimizerHiveTask.cs	(revision 7215)
@@ -65,5 +65,7 @@
             Optimization.Experiment experiment = (Optimization.Experiment)ItemTask.Item;
             foreach (IOptimizer childOpt in experiment.Optimizers) {
-              this.childHiveTasks.Add(new OptimizerHiveTask(childOpt));
+              var optimizerHiveTask = new OptimizerHiveTask(childOpt);
+              optimizerHiveTask.Task.Priority = Task.Priority; //inherit priority from parent
+              this.childHiveTasks.Add(optimizerHiveTask);
             }
           } else if (ItemTask.Item is Optimization.BatchRun) {
@@ -71,5 +73,7 @@
             if (batchRun.Optimizer != null) {
               while (this.childHiveTasks.Count < batchRun.Repetitions) {
-                this.childHiveTasks.Add(new OptimizerHiveTask(batchRun.Optimizer));
+                var optimizerHiveTask = new OptimizerHiveTask(batchRun.Optimizer);
+                optimizerHiveTask.Task.Priority = Task.Priority;
+                this.childHiveTasks.Add(optimizerHiveTask);
               }
               while (this.childHiveTasks.Count > batchRun.Repetitions) {
@@ -136,6 +140,5 @@
             }
           }
-        }
-        finally { childHiveTasksLock.ExitWriteLock(); }
+        } finally { childHiveTasksLock.ExitWriteLock(); }
       }
     }
@@ -152,6 +155,5 @@
             }
           }
-        }
-        finally { childHiveTasksLock.ExitWriteLock(); }
+        } finally { childHiveTasksLock.ExitWriteLock(); }
       }
     }
@@ -163,6 +165,5 @@
             this.childHiveTasks.Remove(this.GetChildByOptimizer(item.Value));
           }
-        }
-        finally { childHiveTasksLock.ExitWriteLock(); }
+        } finally { childHiveTasksLock.ExitWriteLock(); }
       }
     }
@@ -174,6 +175,5 @@
             this.childHiveTasks.Remove(this.GetChildByOptimizer(item.Value));
           }
-        }
-        finally { childHiveTasksLock.ExitWriteLock(); }
+        } finally { childHiveTasksLock.ExitWriteLock(); }
       }
     }
@@ -205,6 +205,5 @@
           child.syncTasksWithOptimizers = true;
         }
-      }
-      finally { childHiveTasksLock.ExitReadLock(); }
+      } finally { childHiveTasksLock.ExitReadLock(); }
       syncTasksWithOptimizers = true;
     }
@@ -268,11 +267,10 @@
           child.SetIndexInParentOptimizerList(this);
         }
-      }
-      finally { childHiveTasksLock.ExitReadLock(); }
-    }
-
-    public override void AddChildHiveJob(HiveTask hiveJob) {
-      base.AddChildHiveJob(hiveJob);
-      var optimizerHiveJob = (OptimizerHiveTask)hiveJob;
+      } finally { childHiveTasksLock.ExitReadLock(); }
+    }
+
+    public override void AddChildHiveTask(HiveTask hiveTask) {
+      base.AddChildHiveTask(hiveTask);
+      var optimizerHiveJob = (OptimizerHiveTask)hiveTask;
       syncTasksWithOptimizers = false;
       if (this.ItemTask != null && optimizerHiveJob.ItemTask != null) {
@@ -339,6 +337,5 @@
         }
         return null;
-      }
-      finally { childHiveTasksLock.ExitReadLock(); }
+      } finally { childHiveTasksLock.ExitReadLock(); }
     }
 
@@ -351,6 +348,5 @@
         }
         return null;
-      }
-      finally { childHiveTasksLock.ExitReadLock(); }
+      } finally { childHiveTasksLock.ExitReadLock(); }
     }
 
@@ -362,5 +358,5 @@
       int idx = run.Name.IndexOf("Run ") + 4;
 
-      if (idx == -1 || runs.Count == 0)
+      if (idx == 3 || runs.Count == 0)
         return run.Name;
 
@@ -379,5 +375,5 @@
     private static int GetRunNumber(string runName) {
       int idx = runName.IndexOf("Run ") + 4;
-      if (idx == -1) {
+      if (idx == 3) {
         return 0;
       } else {
