WIP upgrade fixes