fix getting original document from revision