bugfix for order by view