Working ForEach code
Fix for ForEach over array