fixed socket delegate bug