Fix to delete generated document.