fix next().done in iterator stmt