fixes some migration issues