fixed throwing exception if a nested transaction occurs