Upgrade fixes