Fixes for FreeBSD
 Some fixes for subdomains