Nicer way to handle the ConcurrentModification issue.