fix migration issues