fix the bug where a document was shown in the analyses tab even when the user has removed it from the upload tab