This patch fixes issue #364

This patch fixes issue #364