fix some logic in make.sh