fixed socket bug