This fixes issue #804