Corrections to transmitter code

From Alan Adamson.