Fix foreach in Server