Improve robustness of server discovery