This patch fixes issue #3258