Fixes issue #868