fix i loop