fixes issue #407