Fix for #158
Merge pull request #248 from RcColes/master

Fix for #158