This commit fixes some transactional issues.