Fixing bug 1169, sorting orders results in an empty list
Merge pull request #268 from einhverfr/1.3

Fixing bug 1169, sorting orders results in an empty list