fixed bug where paging didnt work for tables with multiple primary keys