A better fix for pagination.