fix loopiter usage