Better socket clean up