one more place with flawed loop