Improved transaction handling.