Fix error writing history on new doc.