fixed foreach tests