small socket fixes