bug fix in _send_thread