fixes to Tx.py