Fixed handler of UpgradeRequiredError exception