Fixes #898.
Merge pull request #920 from herby/gh-898

Fixes #898.