Correct erroneous map with correct forEach