Fixed a bug in testmod_hosts