fix infinite loop when the host begins with '.'