Fixed a bug in the TX strategy, and improved readability