Fix loop conditional typo