Fix misusing iterator.
Merge pull request #18 from gwtnb/map_iterator

Fix misusing iterator.