Fixes a crash that can occur when adding a self-hosted site.