Some migration fixes