Tests and forEach fix