Fix corrupted socket