fixed glitch in socket communication