fixed a socket.io connection bug