Bug fixes in loops

Loop fixes and some wording changes.