Fix empty host check