Fixed warning foreach