Fixes issue #774