add fix const to foreach