fixes in Tx routine