paginator bug for totalPages smaller than pagesToShow