Added document-buffer sync.