closed sockets fix