Fix issue #338