Index: /branches/HeuristicLab.DebugEngine/DebugEngine.cs
===================================================================
--- /branches/HeuristicLab.DebugEngine/DebugEngine.cs	(revision 4945)
+++ /branches/HeuristicLab.DebugEngine/DebugEngine.cs	(revision 4946)
@@ -40,8 +40,7 @@
       : base(deserializing) {
       pausePending = stopPending = false;
-      timer = new System.Timers.Timer(100);
-      timer.AutoReset = true;
-      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
-    }
+      InitializeTimer();
+    }
+
     protected DebugEngine(DebugEngine original, Cloner cloner)
       : base(original, cloner) {
@@ -49,13 +48,11 @@
       Log = cloner.Clone(original.Log);
       ExecutionStack = cloner.Clone(original.ExecutionStack);
-      OperatorTrace = new ItemList<IOperator>(original.OperatorTrace.Select(op => cloner.Clone(op)));
+      OperatorTrace = cloner.Clone(OperatorTrace);
       operatorParents = original.operatorParents.ToDictionary(kvp => cloner.Clone(kvp.Key), kvp => cloner.Clone(kvp.Value));
       pausePending = original.pausePending;
       stopPending = original.stopPending;
-      timer = new System.Timers.Timer(100);
-      timer.AutoReset = true;
-      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
-      this.currentOperation = cloner.Clone(original.currentOperation);
-      this.currentOperator = cloner.Clone(original.currentOperator);
+      InitializeTimer();
+      currentOperation = cloner.Clone(original.currentOperation);
+      currentOperator = cloner.Clone(original.currentOperator);
     }
     public DebugEngine()
@@ -66,11 +63,15 @@
       operatorParents = new Dictionary<IAtomicOperation, IAtomicOperation>();
       pausePending = stopPending = false;
+      InitializeTimer();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DebugEngine(this, cloner);
+    }
+
+    private void InitializeTimer() {
       timer = new System.Timers.Timer(100);
       timer.AutoReset = true;
       timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new DebugEngine(this, cloner);
     }
 
@@ -100,8 +101,8 @@
       get { return currentOperation; }
       private set {
-        if (value == currentOperation)
-          return;
-        currentOperation = value;
-        OnOperationChanged(value);
+        if (value != currentOperation) {
+          currentOperation = value;
+          OnOperationChanged(value);
+        }
       }
     }
@@ -126,5 +127,4 @@
 
     public event EventHandler<OperationChangedEventArgs> CurrentOperationChanged;
-
     protected virtual void OnOperationChanged(IOperation newOperation) {
       EventHandler<OperationChangedEventArgs> handler = CurrentOperationChanged;
@@ -264,5 +264,6 @@
         } else if (operations != null) {
           Log.LogMessage("Expanding operation collection");
-          ExpandOperationCollection(operations);
+          ExecutionStack.AddRange(operations.Reverse());
+          CurrentOperation = null;
         } else if (ExecutionStack.Count > 0) {
           Log.LogMessage("Popping execution stack");
@@ -273,5 +274,6 @@
         }
         GenerateOperationTrace();
-      } catch (Exception x) {
+      }
+      catch (Exception x) {
         OnExceptionOccurred(x);
       }
@@ -315,5 +317,6 @@
           currentOperator = null;
           CurrentOperation = null;
-        } catch (Exception ex) {
+        }
+        catch (Exception ex) {
           OnExceptionOccurred(new OperatorExecutionException(operation.Operator, ex));
           Pause();
@@ -332,9 +335,4 @@
     }
 
-    protected virtual void ExpandOperationCollection(OperationCollection operations) {
-      ExecutionStack.AddRange(operations.Reverse());
-      CurrentOperation = null;
-    }
-
     protected virtual string Name(IAtomicOperation operation) {
       return string.IsNullOrEmpty(operation.Operator.Name) ? operation.Operator.ItemName : operation.Operator.Name;
