Wrap in transaction

[ci skip]