Fix typoed variable in foreach()