Fix concurrentmodification issue