Fixing iteration syntax