Fix BeginTransaction bug

Fix BeginTransaction bug