Fixed issue #346