debug
fixed socket communication