Fixing a concurrent modification error.