cdf fix for single value inputs

manual merge from shadow/shadow#229 and shadow/shadow#230