fix sytnax on foreach loop