you should check if container is not empty before call *ut->begin()