Fixed a bug where objects was removed from a list while the list was iterated somewhere else (hopefully)