Fix issue with public realm in build_url