Fixes #240
Merge pull request #247 from mtoma/fix-issue-240

Fixes #240