fixed a createDocumentFromSource issue