Upgrade fixes

problems found while looking at #1868