fix a document