fixing hostname and client lookup
fixing hostname and client lookup