fixed sorting bug in corpus.doctest
fixed number of items bug in corpus.doctest