Pagination bug fix...started...

Not completed fully