Fixes issue #829