Fix a bug in pagination where there aren't any items to show up