Fixes issue #746