fixed flip/flop failure to send data, improved transmitter logic