Index: /code/trunk/src/core/Identifier.h
===================================================================
--- /code/trunk/src/core/Identifier.h	(revision 1062)
+++ /code/trunk/src/core/Identifier.h	(revision 1063)
@@ -303,7 +303,7 @@
             void setName(const std::string& name);
             /** @brief Returns the list of all existing objects of this class. @return The list */
-            inline const ObjectList<T>* getObjects() const { return this->objects_; }
+            inline ObjectList<T>* getObjects() const { return this->objects_; }
             /** @brief Returns a list of all existing objects of this class. @return The list */
-            inline const ObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; }
+            inline ObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; }
 
             void updateConfigValues() const;
Index: /code/trunk/src/core/Iterator.h
===================================================================
--- /code/trunk/src/core/Iterator.h	(revision 1062)
+++ /code/trunk/src/core/Iterator.h	(revision 1063)
@@ -65,4 +65,5 @@
             {
                 this->element_ = 0;
+                ClassManager<T>::getIdentifier()->getObjects()->registerIterator(this);
             }
 
@@ -74,4 +75,13 @@
             {
                 this->element_ = element;
+                ClassManager<T>::getIdentifier()->getObjects()->registerIterator(this);
+            }
+
+            /**
+                @brief Unregisters the Iterator from the ObjectList.
+            */
+            ~Iterator()
+            {
+                ClassManager<T>::getIdentifier()->getObjects()->unregisterIterator(this);
             }
 
@@ -91,5 +101,6 @@
             Iterator<T> operator++()
             {
-                this->element_ = this->element_->next_;
+                if (this->element_)
+                    this->element_ = this->element_->next_;
                 return *this;
             }
@@ -102,5 +113,6 @@
             {
                 Iterator<T> copy = *this;
-                this->element_ = this->element_->next_;
+                if (this->element_)
+                    this->element_ = this->element_->next_;
                 return copy;
             }
@@ -112,5 +124,6 @@
             Iterator<T> operator--()
             {
-                this->element_ = this->element_->prev_;
+                if (this->element_)
+                    this->element_ = this->element_->prev_;
                 return *this;
             }
@@ -123,5 +136,6 @@
             {
                 Iterator<T> copy = *this;
-                this->element_ = this->element_->prev_;
+                if (this->element_)
+                    this->element_ = this->element_->prev_;
                 return copy;
             }
@@ -133,5 +147,8 @@
             T* operator*()
             {
-                return this->element_->object_;
+                if (this->element_)
+                    return this->element_->object_;
+                else
+                    return 0;
             }
 
@@ -142,5 +159,8 @@
             T* operator->() const
             {
-                return this->element_->object_;
+                if (this->element_)
+                    return this->element_->object_;
+                else
+                    return 0;
 
             }
Index: /code/trunk/src/core/MetaObjectList.h
===================================================================
--- /code/trunk/src/core/MetaObjectList.h	(revision 1062)
+++ /code/trunk/src/core/MetaObjectList.h	(revision 1063)
@@ -89,4 +89,7 @@
     MetaObjectListElement<T>::~MetaObjectListElement()
     {
+        COUT(5) << "*** MetaObjectList: Removing Object from " << ClassManager<T>::getIdentifier()->getName() << "-list." << std::endl;
+        this->list_->notifyIterators(this->element_);
+
         if (this->element_->next_)
             this->element_->next_->prev_ = this->element_->prev_;
@@ -99,6 +102,4 @@
             this->list_->first_ = this->element_->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list
 
-
-        COUT(5) << "*** MetaObjectList: Removing Object from " << ClassManager<T>::getIdentifier()->getName() << "-list." << std::endl;
         delete this->element_;
     }
@@ -106,5 +107,5 @@
 
     // ###############################
-    // ###       ObjectList        ###
+    // ###     MetaObjectList      ###
     // ###############################
     //!  The MetaObjectList contains ObjectListElements and their ObjectLists.
Index: /code/trunk/src/core/ObjectList.h
===================================================================
--- /code/trunk/src/core/ObjectList.h	(revision 1062)
+++ /code/trunk/src/core/ObjectList.h	(revision 1063)
@@ -38,4 +38,6 @@
 #ifndef _ObjectList_H__
 #define _ObjectList_H__
+
+#include <set>
 
 #include "CorePrereqs.h"
@@ -90,5 +92,4 @@
 
             ObjectListElement<T>* add(T* object);
-//            void remove(OrxonoxClass* object, bool bIterateForwards = true);
 
             /** @brief Returns the first element in the list. @return The first element */
@@ -104,6 +105,15 @@
                 { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->last_); }
 
+            inline void registerIterator(Iterator<T>* iterator)
+                { this->iterators_.insert(this->iterators_.end(), (void*)iterator); }
+            inline void unregisterIterator(Iterator<T>* iterator)
+                { this->iterators_.erase((void*)iterator); }
+            void notifyIterators(ObjectListElement<T>* element);
+
             ObjectListElement<T>* first_;       //!< The first element in the list
             ObjectListElement<T>* last_;        //!< The last element in the list
+
+        private:
+            std::set<void*> iterators_;  //!< A list of iterators pointing on an element in this list
     };
 
@@ -134,4 +144,16 @@
 
     /**
+        @brief Increases all Iterators that currently point on the given element (because it gets removed).
+        @param element The element that gets removed
+    */
+    template <class T>
+    void ObjectList<T>::notifyIterators(ObjectListElement<T>* element)
+    {
+        for (std::set<void*>::iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it)
+            if ((*(*((Iterator<T>*)(*it)))) == element->object_)
+                ++(*((Iterator<T>*)(*it)));
+    }
+
+    /**
         @brief Adds a new object to the end of the list.
         @param object The object to add
@@ -158,104 +180,4 @@
         return this->last_;
     }
-
-
-//    /**
-//        @brief Removes an object from the list.
-//        @param object The object to remove
-//        @param bIterateForwards If true: Start searching the object at the beginning of the list
-//    */
-    /*
-    template <class T>
-    void ObjectList<T>::remove(OrxonoxClass* object, bool bIterateForwards)
-    {
-        if (!object || !this->first_ || !this->last_)
-            return;
-
-        // If there's only one object in the list, we have to set first_ and last_ to zero
-        if (this->first_ == this->last_)
-        {
-            if (this->first_->object_ == object)
-            {
-                delete this->first_;
-                this->first_ = 0;
-                this->last_ = 0;
-            }
-
-            return;
-        }
-
-        // Now we are sure we have more than one element in the list
-        if (bIterateForwards)
-        {
-            // Start at the beginning of the list
-
-            // Check if it's the first object
-            if (this->first_->object_ == object)
-            {
-                ObjectListElement<T>* temp = this->first_->next_;
-                delete this->first_;
-                this->first_ = temp;
-                this->first_->prev_ = 0;
-
-                return;
-            }
-
-            // Iterate through the whole list
-            ObjectListElement<T>* temp = this->first_;
-            while (temp->next_)
-            {
-                if (temp->next_->object_ == object)
-                {
-                    ObjectListElement<T>* temp2 = temp->next_->next_;
-                    delete temp->next_;
-                    temp->next_ = temp2;
-                    if (temp2)
-                        temp2->prev_ = temp;
-                    else
-                        this->last_ = temp; // If there is no next_, we deleted the last element and have to update the last_ pointer.
-
-                    return;
-                }
-
-                temp = temp->next_;
-            }
-        }
-        else
-        {
-            // Start at the end of the list
-
-            // Check if it's the last object
-            if (this->last_->object_ == object)
-            {
-                ObjectListElement<T>* temp = this->last_->prev_;
-                delete this->last_;
-                this->last_ = temp;
-                this->last_->next_ = 0;
-
-                return;
-            }
-
-            // Iterate through the whole list
-            ObjectListElement<T>* temp = this->last_;
-            while (temp->prev_)
-            {
-                if (temp->prev_->object_ == object)
-                {
-                    ObjectListElement<T>* temp2 = temp->prev_->prev_;
-                    delete temp->prev_;
-                    temp->prev_ = temp2;
-                    if (temp2)
-                        temp2->next_ = temp;
-                    else
-                        this->first_ = temp; // If there is no prev_, we deleted the first element and have to update the first_ pointer.
-
-                    return;
-                }
-
-                temp = temp->prev_;
-            }
-        }
-    }
-    */
 }
 
Index: /code/trunk/src/orxonox/tools/Timer.cc
===================================================================
--- /code/trunk/src/orxonox/tools/Timer.cc	(revision 1062)
+++ /code/trunk/src/orxonox/tools/Timer.cc	(revision 1063)
@@ -108,6 +108,13 @@
                 // It's time to call the function
                 if (this->bLoop_)
-                    // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.
-                    this->time_ += this->interval_;
+                {
+                    this->time_ += this->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.
+                    while (this->time_ <= 0)
+                    {
+                        // The interval was shorter than one tick, so execute the function more than once
+                        this->run();
+                        this->time_ += this->interval_;
+                    }
+                }
                 else
                     this->stopTimer(); // Stop the timer if we don't want to loop
@@ -117,4 +124,3 @@
         }
     }
-
 }
