fixes issue #373