Improve config/upgrade/canonical handling