Fixed /etc/hosts logic