fixes #16.
Merge pull request #18 from djhaynes/master

fix for issue #16