fixes issue #962