Redo of issue 769
Merge pull request #774 from eqbot/master

Redo of merge 760