clean up the socket counting thing. third time's a charm.