This fixes issue #806