More socket sanitization