changed compoundDocument to richDocument
merge conflict