Fix foreach