fix bug in nn.socket