Fix for broken upgrades.