fixing a socketting bug