Fix issue #349