fix pagination for comments and messages