fixing bug in host_entry method