Fixing migration issues