Updated to fix pagination of AJAX requests.