more socket fixes