fix refactoring migration issues