Improve upgrade_org