Improve search.upgrade_host