fixed the transmit thread finally again