Fix multiple hosts problem.
Merge pull request #15 from kea/multiple-hosts-autoexit

Fix multiple hosts problem.