Fixed issues related to transaction scope;