Fixes issue #2679