subdomain changes and some bugfixes