Fixing concurrent modification exception