Fixed a server connecting bug