Rework logic around upgrades and downgrades