fixed some pagination issues.