fixes #21
Merge pull request #22 from naglis/master

Fix for issue #21