fixed socket issues