Lot of fixes to support  multi-version migration