correction to CleanSweepCorpus function