Fixed a bug where the UpgradeException wouldn't be caught.