more $domain related fixes