Fix for issue #352