Bugfix for #2704
Merge pull request #2725 from werk85/master

Bugfix for #2704