Fixed connection issue with socket.io