Added correct subdomain logic