various migration fixes