Fixes #574
Merge pull request #613 from herby/gh-574

Fixes #574