various migration improvements