fixes #8.
Merge pull request #35 from djhaynes/master

Fix for issue #8