Fix for issue #343