cleanup sockets fix