Fix major socket leakage

The S3 part doesn't close lots of bodies, this fixes (a part?) of them