Fixes issue #374