Fix for Pagination::InstanceMethods.total_pages