fixing the perma-socketing bug