Fix concurrent modification exceptions.