fix for issue 4
Merge branch 'issue4' of https://github.com/nenadv/git2 into issue4
Merge pull request #8 from nenadv/issue4

fixes #4