bind port exception and sockets fix