Second attempt at #67.
Merge pull request #885 from dsissitka/patch-7

Second attempt at #67.