Fixed missing forEach method for IE compatibility