total_pages was being round to the nearest integer. Now it is being rounded up (the ceiling)). When there are 26 results and 25 results per page, there should be two pages of results