am a724d865: Merge "Fix incorrect looping limits." into klp-dev

* commit 'a724d865372530e01e4bb14751e0305da9bc377b':
  Fix incorrect looping limits.