fixed #52 concurrent modification issue