migration tool bug fix: avoid write conflict