Fix several issues.

- Pagination issues.
- PM issues.