Fixed a concurrent modification issue