fixed .each / .forEach bug