Fixes #1357
Merge pull request #1779 from Kleptobismol/issue1357

Fixes #1357