Correcting error that created repeated documents