Remove extra end-document.