Improve sub-domain handling; fix