More cleanup around transaction boundaries