Fix for legacy upgrades.