Removed unnecessary code in a foreach statement