Added test for TX that fails twice; test fails; refactoring