Fix typo causing ratechange to not be observed. Simplify foreach.