Fixed migration issues