fix bugs: save doccorpus in every updates;