Fixes issue #352