Change forEach to for loop for a small bit of performance.