fixes #11
resolves #10
Merge pull request #12 from yohny/master

bugfixes