socket.c fixes