diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp
index 526c07815..6cf31d0a4 100644
--- a/apps/opencs/model/world/collection.hpp
+++ b/apps/opencs/model/world/collection.hpp
@@ -236,14 +236,15 @@ namespace CSMWorld
                 if (iter->second>=index+count)
                 {
                     iter->second -= count;
+                    ++iter;
                 }
                 else
                 {
                     mIndex.erase (iter++);
                 }
             }
-
-            ++iter;
+            else
+                ++iter;
         }
     }