Added closing sockets