Merge pull request #4867 from atif-shaikh/UpgradeFix