fixes issue #398