Fix flipped close tags in pagination.