Fix a ConcurrentModificationException