fix diag_send bug