Fix bugs in migration bundle.