Issue 917

Fixes #917