Bash: fix optimization of cdf helper.