First attempt at #125.
Merge pull request #831 from dsissitka/patch-3

First attempt at #125.