Find host
Use reset() instead of array_shift() as it gives "false" instead of "null", respectfully, on empty array
Remove no longer needed check