Fix code in SimpleDocumentResource that don't satisfy the expectation of some tests