fix foreach
Merge pull request #16 from Charlie-Lucas/patch-4

fix foreach