Fixes issue #2007