fixed paging bug involving order by