Fix wrong syntax in foreach loop.