Fix sorting of threaded messages.
Merge pull request #242 from maniac103/fix-sort

Fix sorting of threaded messages.