fix transactional bug