Fix host extraction from URLs.