fix bug with send/recive data