order by bugfix