Fixes #541
Merge pull request #543 from herby/gh-541

Fixes #541