Fix issue #826