Corrected bugs in Corpus class