Bugfix: bad orderby and direction