Fixed possible ConcurrentModificationException