bug 1318: Fix a check for if there were any servers
bug 1318: Actually sort by priority