Fixing issue with transactions