Merge pull request #17 from sclassen/master

Fix for issue 33 and 38