Index: src/Actions/Action.cpp
===================================================================
--- src/Actions/Action.cpp	(revision 33c97e84dae27f29caf454929853623b09c497bb)
+++ src/Actions/Action.cpp	(revision 601ef8103d4e9e074f5fdcf17ea01dec9372e95f)
@@ -146,6 +146,6 @@
   endTimer();
 
-  if(shouldUndo() && state != failure){
-    if(canUndo()){
+  if (shouldUndo() && state != Action::failure) {
+    if (canUndo()) {
       ActionQueue::getInstance().addElement(this,state);
     }
Index: src/Actions/ActionQueue.cpp
===================================================================
--- src/Actions/ActionQueue.cpp	(revision 33c97e84dae27f29caf454929853623b09c497bb)
+++ src/Actions/ActionQueue.cpp	(revision 601ef8103d4e9e074f5fdcf17ea01dec9372e95f)
@@ -44,4 +44,5 @@
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/version.hpp>
+#include <iterator>
 #include <string>
 #include <sstream>
@@ -61,8 +62,8 @@
     AR(new ActionRegistry()),
     history(new ActionHistory),
-    CurrentAction(0),
 #ifndef HAVE_ACTION_THREAD
     lastActionOk(true)
 #else
+    CurrentAction(0),
     lastActionOk(true),
     run_thread(boost::bind(&ActionQueue::run, this)),
@@ -82,4 +83,6 @@
 #ifdef HAVE_ACTION_THREAD
   stop();
+
+  clearTempQueue();
 #endif
 
@@ -111,13 +114,13 @@
     std::cerr << "Action " << *boost::get_error_info<ActionNameString>(e) << " has failed." << std::endl;
     World::getInstance().setExitFlag(5);
-//    clearQueue();
+    clearQueue(actionqueue.size()-1);
     lastActionOk = false;
-//    std::cerr << "ActionQueue cleared." << std::endl;
+    std::cerr << "Remaining Actions cleared from queue." << std::endl;
   } catch (std::exception &e) {
     pushStatus("FAIL: General exception caught, aborting.");
     World::getInstance().setExitFlag(134);
-    clearQueue();
+    clearQueue(actionqueue.size()-1);
     lastActionOk = false;
-    std::cerr << "ActionQueue cleared." << std::endl;
+    std::cerr << "Remaining Actions cleared from queue." << std::endl;
   }
   if (lastActionOk) {
@@ -127,8 +130,5 @@
   }
 #else
-  {
-    boost::lock_guard<boost::mutex> lock(mtx_idle);
-    run_thread_isIdle = (CurrentAction == actionqueue.size());
-  }
+  setRunThreadIdle(CurrentAction == actionqueue.size());
   mtx_queue.unlock();
 #endif
@@ -144,8 +144,5 @@
   mtx_queue.lock();
   tempqueue.push_back( newaction );
-  {
-    boost::lock_guard<boost::mutex> lock(mtx_idle);
-    run_thread_isIdle = !((CurrentAction != actionqueue.size()) || !tempqueue.empty());
-  }
+  setRunThreadIdle( !((CurrentAction != actionqueue.size()) || !tempqueue.empty()) );
   mtx_queue.unlock();
 #endif
@@ -184,14 +181,14 @@
         pushStatus("FAIL: Action "+*boost::get_error_info<ActionNameString>(e)+" has failed.");
         World::getInstance().setExitFlag(5);
-        clearQueue();
+        clearQueue(CurrentAction);
+        clearTempQueue();
         lastActionOk = false;
-        std::cerr << "ActionQueue cleared." << std::endl;
-        CurrentAction = (size_t)-1;
+        std::cerr << "Remaining Actions cleared from queue." << std::endl;
       } catch (std::exception &e) {
         pushStatus("FAIL: General exception caught, aborting.");
         World::getInstance().setExitFlag(134);
-        clearQueue();
-        std::cerr << "ActionQueue cleared." << std::endl;
-        CurrentAction = (size_t)-1;
+        clearQueue(CurrentAction);
+        clearTempQueue();
+        std::cerr << "Remaining Actions cleared from queue." << std::endl;
       }
       if (lastActionOk) {
@@ -199,9 +196,10 @@
         NOTIFY(ActionQueued);
         _lastchangedaction = actionqueue[CurrentAction];
+        mtx_queue.lock();
+        CurrentAction++;
+        mtx_queue.unlock();
       }
       // access actionqueue, hence using mutex
       mtx_queue.lock();
-      // step on to next action and check for end
-      CurrentAction++;
       // insert new actions (before [CurrentAction]) if they have been spawned
       // we must have an extra vector for this, as we cannot change actionqueue
@@ -211,13 +209,9 @@
       mtx_queue.unlock();
     }
-    {
-      boost::lock_guard<boost::mutex> lock(mtx_idle);
-      run_thread_isIdle = !((CurrentAction != actionqueue.size()) || !tempqueue.empty());
-    }
+    setRunThreadIdle( !((CurrentAction != actionqueue.size()) || !tempqueue.empty()) );
     cond_idle.notify_one();
 //    LOG(1, "DEBUG: End of ActionQueue's run() loop.");
   } while (!Interrupted);
 }
-#endif
 
 void ActionQueue::insertTempQueue()
@@ -231,5 +225,4 @@
 }
 
-#ifdef HAVE_ACTION_THREAD
 void ActionQueue::wait()
 {
@@ -316,12 +309,26 @@
 }
 
-void ActionQueue::clearQueue()
-{
-  // free all actions contained in actionqueue
-  for (ActionQueue_t::iterator iter = actionqueue.begin();
-      !actionqueue.empty(); iter = actionqueue.begin()) {
+void ActionQueue::clearQueue(const size_t _fromAction)
+{
+#ifdef HAVE_ACTION_THREAD
+  mtx_queue.lock();
+#endif
+  LOG(1, "Removing all Actions from position " << _fromAction << " onward.");
+  // free all actions still to be called contained in actionqueue
+  ActionQueue_t::iterator inititer = actionqueue.begin();
+  std::advance(inititer, _fromAction);
+  for (ActionQueue_t::iterator iter = inititer; iter != actionqueue.end(); ++iter)
     delete *iter;
-    actionqueue.erase(iter);
-  }
+  actionqueue.erase(inititer, actionqueue.end());
+  LOG(1, "There are " << actionqueue.size() << " remaining Actions.");
+#ifdef HAVE_ACTION_THREAD
+  CurrentAction = actionqueue.size();
+  mtx_queue.unlock();
+#endif
+}
+
+#ifdef HAVE_ACTION_THREAD
+void ActionQueue::clearTempQueue()
+{
   // free all actions contained in tempqueue
   for (ActionQueue_t::iterator iter = tempqueue.begin();
@@ -330,11 +337,14 @@
     tempqueue.erase(iter);
   }
-#ifdef HAVE_ACTION_THREAD
+}
+
+void ActionQueue::setRunThreadIdle(const bool _flag)
+{
   {
     boost::unique_lock<boost::mutex> lock(mtx_idle);
-    run_thread_isIdle = true;
-  }
-#endif
-}
+    run_thread_isIdle = _flag;
+  }
+}
+#endif
 
 const ActionQueue::ActionTokens_t ActionQueue::getListOfActions() const
Index: src/Actions/ActionQueue.hpp
===================================================================
--- src/Actions/ActionQueue.hpp	(revision 33c97e84dae27f29caf454929853623b09c497bb)
+++ src/Actions/ActionQueue.hpp	(revision 601ef8103d4e9e074f5fdcf17ea01dec9372e95f)
@@ -202,10 +202,23 @@
   void clear();
 
-  /** Clears all actions currently present in the actionqueues.
-   *
-   */
-  void clearQueue();
-
-#ifdef HAVE_ACTION_THREAD
+  /** Clears all actions present in the actionqueues from \a _fromAction.
+   *
+   * @param _fromAction 0 if all Actions to clear or else
+   */
+  void clearQueue(const size_t _fromAction = 0);
+
+#ifdef HAVE_ACTION_THREAD
+
+  /** Clears the temporary queue.
+   *
+   */
+  void clearTempQueue();
+
+  /** Sets the run_thread_isIdle flag.
+   *
+   * @param _flag state to set to
+   */
+  void setRunThreadIdle(const bool _flag);
+
   /** Runs the ActionQueue.
    *
@@ -226,4 +239,10 @@
    */
   void wait();
+
+  /** Moves all action from tempqueue into real queue.
+   *
+   */
+  void insertTempQueue();
+
 #endif
 
@@ -236,9 +255,4 @@
   void insertAction(Action *_action, enum Action::QueryOptions state);
 
-  /** Moves all action from tempqueue into real queue.
-   *
-   */
-  void insertTempQueue();
-
 private:
   /** Private cstor for ActionQueue.
@@ -267,4 +281,8 @@
   ActionQueue_t actionqueue;
 
+  //!> indicates that the last action has failed
+  bool lastActionOk;
+
+#ifdef HAVE_ACTION_THREAD
   //!> point to current action in actionqueue
   size_t CurrentAction;
@@ -273,8 +291,4 @@
   ActionQueue_t tempqueue;
 
-  //!> indicates that the last action has failed
-  bool lastActionOk;
-
-#ifdef HAVE_ACTION_THREAD
   //!> internal thread to call Actions
   boost::thread run_thread;
