Fixed foreach