Fixed some errors in transaction handling for multiple clients.