fix bugs in combine.sh