Fixes issue #337