Merge pull request #196 from KevinSjoberg/master

Fix issue #190 and #195