fix up transaction handling