Fixed remaining iterator bug, with addition of some absent curly braces.