WIP #779 Upgrade script fails