fix concurrent modification issue