Added support for multiple hosts.