DATAGRAPH-352/330 : Fixed Issues relating to Sorting and Paging

@jexp Fixes against master branch as requested