Fix for #115
Merge pull request #116 from robshep/master

fixes #115