fix nested transactions