logic error in build/rrd.sh?