various fixes: updating order and cleaning up TM after TX is done