Fixed typo

The foreach loop had "and" instead of "as"