Fixed bug with iteration; Fixes #8