Fixed race condition when getting a server, which avoids throwing an exception when not necessary to do so