PDB-554 Fix hostname setting logic

Signed-off-by: Ken Barber <ken@bob.sh>