a fix to socket.on