Fix concurrent modification problem issue #16