Fixes #786