fix to prevent concurrent modification exception