fix forEach loop