bugfixes in hosts script