TxEngine: fix locking issue