fix for row count condition, fix for js error when there’s no more link present