I have a script similar to this, and the way i went around that bug is to specifically join that subserver. So if i specified a server without the sub-server, it would join a random one, override the original with the sub server, and use that as the server to join everytime. If you are interested in looking at how i went around it by viewing the code, i have it posted here on hawkee