fixed a small bug in the hosts file lookup