fix sliding paginator helper

fix pages range when pages amount in range more than total pages amount