Fix issue #5,#6
Merge pull request #22 from thypon/master

Fix issue #5,#6