Improved transaction handling