Fixes migration issues