This patch fixes issue #364