Merge pull request #8 from Alexpux/master

Fix issues with iterator and returning value