Fix #104
Merge pull request #109 from F1ynn/fix-104

Fix #104
Merge pull request #6 from tux3/master

Rebase on upstream