socket bug fix