minor bugfix with pagination
add guard compatibility for puma