fixed a fairly nasty bug that would double allocate the sockets