Fix: auto-switch not working for URLs without a host name.