fix a bug on server selection