Fixed complete crash and concurrent modification error