Add pagination handling.