Protect from possibly closing iter twice

refs #98
One more attempt to fix problem on issue #98
Merge pull request #99 from peco/issue-98

Issue 98