fix call to renderCelementsDocumentWithLayout