fixed sorting bug in corpus.doctest