fix for samples in issue #670