Fixes #1406
Merge pull request #1511 from peterneubauer/master

Fixes #1406