Fixed transactional bugs