Resolve divide-by-zero errors for empty search pages