typo in script loop