minor changes, socket clean