fixes #15.
Merge pull request #31 from djhaynes/master

Fix for issue #15