Fix issue #829