Thanks. I've changed this to a plain forEach loop. Fixed.