Fix an error in UpgradeHandler for fresh installs.