Fixed bugs for memory leak . Trying to run two transactions commit