fixed #336
Merge pull request #357 from lordblackfox/master

fixes #336