Synchronize to avoid ConcurrentModificationException