Fix for order by