Fixed the conditional wrapper on the paginator