Fixes concurrent modification exception.