fix bad upper bound in for/range [ci skip]