fix socket.io implementation