Fixes issues #5 and #6.
Merge pull request #7 from rasilang/master

Fixes issues #5 and #6. Thanks a lot, great job!