bug fix where program could run out of net sockets