Some bug fixes when a static URL is defined in configuration (hosts.xml)