Tested and it works all the time by hostname instead of IP.