fixes issue #382