Some tx fixes (thanks @taringamberini)